Skip to content

Conversation

stefandevai
Copy link
Contributor

@stefandevai stefandevai commented Apr 29, 2020

This fixes #382.

Channels were being reseted each new frame, that caused the notes/effects to stop. Maybe they were being reseted for another specific purpose that I'm unaware of? Now channels are only reseted if the music_state is tic_music_stop.

EDIT:
Added a cartridge that makes it easier to test the fixed issue:
test-sustain.tic.zip

@The-Beesh-Spweesh
Copy link

But there's at least a music track or so made on TIC-80 using the note-cutting upon frame transitions.

@stefandevai
Copy link
Contributor Author

stefandevai commented Apr 29, 2020

But there's at least a music track or so made on TIC-80 using the note-cutting upon frame transitions.

Yeah, that's Hyrum's Law.

In my opinion, it's more consistent when the note gets sustained, so that each frame is just the continuation of a track, not a break point. What do you think is better? :)

@nesbox
Copy link
Owner

nesbox commented Apr 29, 2020

We have a lot of tracks previously created without the note sustaining and we have to keep compatibility with them.
So, as a workaround, we could add a sustain flag to the RAM (somewhere here 0x13FFC https://github.com/nesbox/TIC-80/wiki/RAM#music-position) to control this behavior.

@stefandevai
Copy link
Contributor Author

So, as a workaround, we could add a sustain flag to the RAM (somewhere here 0x13FFC https://github.com/nesbox/TIC-80/wiki/RAM#music-position) to control this behavior.

Sounds good to me, I'll try to implement that :)

@nesbox
Copy link
Owner

nesbox commented Apr 29, 2020

Great, also we need to add a sustain param to the music(track, frame, row, loop, sustain=false) API, as well as UI button in the Music Editor to enable the mode.

@stefandevai
Copy link
Contributor Author

Maybe we should add a settings popup or second screen with this mode, follow mode, and future modes we may add? In this way, the tracker's UI remains clean and only with the most used tools. I don't think people will be constantly toggling follow mode or sustain mode. Plus, a cluttered UI usually turns people off. What do you think?

@nesbox
Copy link
Owner

nesbox commented Apr 29, 2020

We can add a popup or second screen with the options, but the easiest way is to add a button to the toolbar to enable sustain mode, I think. There is a lot of space :)
image

@stefandevai
Copy link
Contributor Author

That's right, right now there aren't many config options to justify a window. Well, if you add more features in the future you can consider the config window :)

Copy link
Owner

@nesbox nesbox left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

awesome, could you pls fix two points I mentioned in the comments?
thank you

@stefandevai
Copy link
Contributor Author

awesome, could you pls fix two points I mentioned in the comments?
thank you

Right! Thanks :) I also want to make some tests with all the APIs to ensure nothing went wrong...

@nesbox nesbox merged commit 38b39e4 into nesbox:master Apr 30, 2020
@nesbox nesbox added API Issues related to TIC80 API editor: music labels Apr 30, 2020
@nesbox nesbox added this to the 0.80.0 milestone Apr 30, 2020
@stefandevai
Copy link
Contributor Author

How do you deal with the API reference in the wiki? Should we update it now or after a release?

@nesbox
Copy link
Owner

nesbox commented Apr 30, 2020

Yes, I forgot it, we have to update the wiki with 0.80 badge

@stefandevai
Copy link
Contributor Author

Ok. I'll do that then :)

@nesbox nesbox removed this from the 0.80.0 milestone Jul 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API Issues related to TIC80 API editor: music
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Music editor: sustaining notes through frames
3 participants