Skip to content

Commit

Permalink
Tentatively plan on release tomorrow
Browse files Browse the repository at this point in the history
  • Loading branch information
mtolly committed Sep 28, 2024
1 parent b45f2d2 commit 8b6817e
Show file tree
Hide file tree
Showing 7 changed files with 28 additions and 9 deletions.
16 changes: 16 additions & 0 deletions haskell/CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,21 @@
# Version history

# 20240928

* Change Clone Hero output to use newer open note encoding
* Allows open sustains under other notes + fixes handling of "open chords"
* CH Quick Convert now has a toggle to convert tap and open notes
to Phase Shift format
* Fix some `.sng` files not loading in Clone Hero due to missing `song_length`
* Fix songs without charted vocals crashing Lego Rock Band (broke in `20240719`)
* Add loose PS3/RPCS3 folder option to recompile and RB quick convert (#271)
* Import and export Pro Guitar/Bass tuning in Phase Shift format (#272)
* Add support for 5-key and higher `.sm` files (#256)
* Fix ghost notes on GH:WoR drums not being imported/exported correctly
* Minor improvements to GH:WoR background visuals: camera cuts, drum animations
* Add preferences for selecting encoding of `songs.dta` in RB3 recompile
and Quick Convert packs

# 20240719

* Support for encrypted Rock Band MOGG files
Expand Down
2 changes: 1 addition & 1 deletion haskell/packages/onyx-exe-toolkit/package.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: onyx-exe-toolkit
version: '20240719'
version: '20240928'
github: mtolly/onyx
author: Michael Tolly <[email protected]>
category: Distribution
Expand Down
2 changes: 1 addition & 1 deletion haskell/packages/onyx-lib/package.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: onyx-lib
version: '20240719'
version: '20240928'
github: mtolly/onyx
author: Michael Tolly <[email protected]>
category: Distribution
Expand Down
1 change: 1 addition & 0 deletions haskell/packages/onyx-lib/src/Onyx/FretsOnFire.hs
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ data Song = Song
icon
playlist_track
vocal_gender
diff_{guitar,bass,drums,vocals,keys}_pad
-}
} deriving (Eq, Ord, Show)

Expand Down
4 changes: 2 additions & 2 deletions haskell/packages/onyx-lib/src/Onyx/Import/Encore.hs
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,12 @@ data EncoreInfo f = EncoreInfo
, icon_guitar :: T.Text -- aka sig, usual value Guitar or Keyboard
, icon_vocals :: T.Text -- aka siv, usual value Vocals
-- rest optional
, length_ :: Maybe Int
, length_ :: Maybe Int -- seconds, maybe we should allow non-integer?
, charters :: [T.Text]
, release_year :: Maybe T.Text
, album :: Maybe T.Text
, art :: Maybe f
, preview_start_time :: Maybe Int
, preview_start_time :: Maybe Int -- milliseconds
, source :: Maybe T.Text
, loading_phrase :: Maybe T.Text
, genres :: [T.Text]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,7 @@ fillRequiredMetadata = let
secs = fromIntegral frames / fromIntegral rate :: Double
in round $ secs * 1000
withSongLength q = case lookup "song_length" q.metadata of
Just s | T.any (not . isSpace) s -> return q
Just s | T.any (not . isSpace) s && T.strip s /= "0" -> return q
_ -> do
lens <- fmap catMaybes $ forM q.files $ \(name, file) -> case file of
FoFReadable r -> let
Expand All @@ -397,7 +397,7 @@ fillRequiredMetadata = let
return $ liftA2 toLengthMS mframes mrate
else return Nothing
_ -> return Nothing
let ms = case lens of
let ms = case filter (/= 0) lens of
[] -> 1 -- note, 0 does not work
n : ns -> foldr max n ns
return $ let QuickFoF{..} = q in QuickFoF
Expand Down Expand Up @@ -450,8 +450,8 @@ convertEncoreFoF f info = do
, ("album",) <$> toList info.album
, ("loading_phrase",) <$> toList info.loading_phrase
, [("multiplier_note", "116")]
, flip map (toList info.length_) $ \secs -> ("song_length", T.pack $ show $ secs * 1000)
, ("preview_start_time",) . T.pack . show <$> toList info.preview_start_time
, flip map (toList info.length_) $ \secs -> ("song_length", T.pack $ show $ secs * 1000) -- seconds in encore, milliseconds in fof
, ("preview_start_time",) . T.pack . show <$> toList info.preview_start_time -- milliseconds in both
, [("charter", T.intercalate ", " info.charters) | not $ null info.charters]
, ("year",) <$> toList info.release_year
, [("genre", T.intercalate ", " info.genres) | not $ null info.genres]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,9 @@ moggToOggHandles :: Handle -> IO SimpleHandle
moggToOggHandles h = do
(cb, cleanup) <- handleOVCallbacks h
vr@(VorbisReader p) <- vorbisReaderOpen nullPtr cb
when (p == nullPtr) $ fail "Failed to decrypt .mogg file"
when (p == nullPtr) $ do
cleanup
fail "Failed to decrypt .mogg file"
size <- vorbisReaderSizeRaw vr
return SimpleHandle
{ shSize = fromIntegral size
Expand Down

0 comments on commit 8b6817e

Please sign in to comment.