Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better AFP reverse button performance during playback #1739

Closed
Reaper10 opened this issue Feb 4, 2015 · 26 comments · Fixed by #6610
Closed

Better AFP reverse button performance during playback #1739

Reaper10 opened this issue Feb 4, 2015 · 26 comments · Fixed by #6610

Comments

@Reaper10
Copy link

Reaper10 commented Feb 4, 2015

I tried to automate the reversing button on/off on the AFP and LMMS crashed when I to play the song.
step1
capture2

step2
capture3

step3
capture4

when LMMS tries to do, do it froze.

@tresf
Copy link
Member

tresf commented Feb 4, 2015

Thanks for the bug report. Please fix your title to reflect the actual bug and provide detailed steps to reproduce. 👍

@badosu
Copy link
Contributor

badosu commented Feb 4, 2015

@Reaper10 Also, if you are able to send a screenshot like you did in the prevous one, that wiould help a lot.

@Reaper10 Reaper10 changed the title faster reversing in AFP automating the reversing button on/off on the AFP can crash LMMS Feb 4, 2015
@Reaper10
Copy link
Author

Reaper10 commented Feb 5, 2015

I'll work on a list of steps to reproduce.
Is the title better?

@badosu
Copy link
Contributor

badosu commented Feb 5, 2015

We still need to understand what exactly is happening with you, but it is more clear now.

@Reaper10
Copy link
Author

Reaper10 commented Feb 5, 2015

step1
capture2

step2
capture3

step3
capture4

when LMMS tries to do, do it froze.

@tresf
Copy link
Member

tresf commented Feb 5, 2015

Thanks 👍

@tresf tresf added the bug label Feb 5, 2015
@tresf tresf added this to the 1.2.0 milestone Feb 5, 2015
@tresf
Copy link
Member

tresf commented Feb 6, 2015

Just tried to reproduce this... no crash... Can you provide a sample track for us to reproduce this on?

screen shot 2015-02-06 at 6 46 52 pm

@Reaper10
Copy link
Author

Reaper10 commented Feb 7, 2015

how do I that/

@tresf
Copy link
Member

tresf commented Feb 7, 2015

Save as .mmp extension, upload to gist, paste link here.

@Reaper10
Copy link
Author

Reaper10 commented Feb 7, 2015

can't feger out how to upload

I'm stupid

@tresf
Copy link
Member

tresf commented Feb 7, 2015

Upload to gist. Then link.

@Reaper10
Copy link
Author

Reaper10 commented Feb 7, 2015

how do I Upload a jzip file to gist with the mmp and the sample in it..
I'm stupid

@tresf
Copy link
Member

tresf commented Feb 7, 2015

Oh... Can you reproduce with a stock wav/ogg file? If not, you may need to host the project on something like Dropbox, google drive, etc.

@Reaper10
Copy link
Author

Reaper10 commented Feb 7, 2015

@tresf
Copy link
Member

tresf commented Feb 7, 2015

Thanks. This hangs the software for about 1 second each time it switches, but doesn't crash it. Seems like large samples are quite timely to reverse which is likely causing this delay.

screen shot 2015-02-07 at 2 28 02 pm

@tresf tresf changed the title automating the reversing button on/off on the AFP can crash LMMS Better AFP reverse button performance during playback Feb 7, 2015
@tresf tresf modified the milestones: 1.3.0, 1.2.0 Feb 7, 2015
@tresf
Copy link
Member

tresf commented Feb 7, 2015

I don't consider this a 1.2 milestone unless we can get confirmation of an actual crash. This is really a nice-to-have enhancement in my opinion.

@tresf tresf added enhancement and removed bug labels Feb 7, 2015
@Sti2nd
Copy link
Contributor

Sti2nd commented Feb 7, 2015

This is really a nice-to-have enhancement in my opinion.

Doing it live is ambitious. Would require a really strong machine. I think I have heard that one usually render out the changes? Maybe Audacity can help us

@Reaper10
Copy link
Author

Reaper10 commented Feb 7, 2015

fl can do it live it's slow.

@Sti2nd
Copy link
Contributor

Sti2nd commented Feb 7, 2015

Live and precomputed. https://answers.yahoo.com/question/index?qid=20091029071012AAS7lhe You are probably more right since you actually have FL studio.

It's slow you say? Depends on the machine. Audacity can for me reverse a 1 minute wav file in under half a second, I think it is pretty fast, but for live purposes it is slow of course. Unless you have a monster of a machine, or a short sample, it is going to sound slow when doing it live :/ However one could use tricks to make it seem like it is being done live, like I assumed FL studio did

@tresf
Copy link
Member

tresf commented Feb 7, 2015

fl can do it live it's slow.

Please stop comparing LMMS to commercial software.

@Reaper10
Copy link
Author

Reaper10 commented Feb 8, 2015

Sorry it's only other music software I know. I learned all I know about music producing on it.
LMMS I like better!!!!:)

@musikBear
Copy link

just a tiny input
this could be achived with two wave-tracks, one reversed, and alternated automation of mute-this-track in both tracks..

@diizy
Copy link
Contributor

diizy commented Feb 8, 2015

I think the problem is that we're reloading the sample every time it's reversed, and in cases where the samplerate of the sample != playback samplerate, this means also resampling the sample every time.

A good solution would be going to Samplebuffer.c, and adding the ability to play buffers in reverse, so the reversing can be done on-the-fly. Playing in reverse that way shouldn't be any more cpu-consuming than playing forwards, after all it's just a matter of reversing some indices and counters...

Then, the actual samplebuffer wouldn't have to be reversed and reloaded, it could just be played forwards/backwards.

@Sti2nd
Copy link
Contributor

Sti2nd commented Feb 8, 2015

Wow, I would never though about that. Sounds genious

@badosu
Copy link
Contributor

badosu commented Feb 9, 2015

This can be my opportunity to tinker with some sound processing code, I'll take a look at it.

@sakertooth
Copy link
Contributor

I think the problem is that we're reloading the sample every time it's reversed, and in cases where the samplerate of the sample != playback samplerate, this means also resampling the sample every time.

A good solution would be going to Samplebuffer.c, and adding the ability to play buffers in reverse, so the reversing can be done on-the-fly. Playing in reverse that way shouldn't be any more cpu-consuming than playing forwards, after all it's just a matter of reversing some indices and counters...

Then, the actual samplebuffer wouldn't have to be reversed and reloaded, it could just be played forwards/backwards.

This is exactly what I had done in #6610. Instead of actually reversing the entire buffer in memory with std::reverse, it is now simply played forwards and backwards, which should've been the default behavior from the start.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.