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

Enable sample track recording #3947

Closed
wants to merge 160 commits into from
Closed

Enable sample track recording #3947

wants to merge 160 commits into from

Conversation

Reflexe
Copy link
Member

@Reflexe Reflexe commented Nov 6, 2017

Download links for testing:

here.

many thanks to @tresf!

Progress

  • Support capture in major interfaces:
    • JACK
    • PulseAudio
    • SDL
  • Make recording work.
  • Make recording usable for humans
    • Recording should record into a new TCO in the track or tracks that has been marked as record.
      • If no track was marked, it shall create a new track and mark it as record.
    • (Optional) Leave a way to record into a specific TCO (the current behaviour).
      • (Optional) Change the color of a TCO that has been set as record.
    • (Need to decide about the correct behaviour) Record according to another sample track: start and stop according to it.
    • Add per sample track audio channel modifiers (e.g. solo right, right both).
    • Hide the regular record button on the song editor.

Issues

  • JACK does not connect lmms to the system input by default.
  • Sometimes with SDL, a few seconds last does not get captured by lmms. (most of the times)
  • For some reason, choosing a global record channel does not work correctly.
    Closes Sample track standalone recorder #3943

@gi0e5b06
Copy link

gi0e5b06 commented Nov 7, 2017

  1. Great. Looks good for me.
    I would merge the Jack part so we can test.

  2. Please add Alsa.

  3. While you're working on these files, could you change the printf() to qWarning()/qCritical() ?
    Not urgent but it has do be done anyway.

@lukas-w
Copy link
Member

lukas-w commented Nov 7, 2017

While you're working on these files, could you change the printf() to qWarning()/qCritical() ?

No, this has nothing to do with this PR. Don't encourage people to do PRs the way you do them.

@qnebra
Copy link

qnebra commented Nov 7, 2017

In my case compiler got this:

/home/lukasz/lmms/compile/lmms/src/core/audio/AudioSdl.cpp: In member function ‘void AudioSdl::sdlInputAudioCallback(Uint8*, int)’:
/home/lukasz/lmms/compile/lmms/src/core/audio/AudioSdl.cpp:312:30: error: no matching function for call to ‘Mixer::pushInputFrames(sample_t (&)[2], fpp_t&, bool)’
true /
applyGain */);

When lmms is compiled with your patch.

@BaraMGB
Copy link
Contributor

BaraMGB commented Nov 7, 2017

I have tested this for ubuntu/Jack. I can record my voice in LMMS 🎉. That's great. I found some issues with the sample track resize from left, which makes no sense in an empty or fresh recorded tco. It should be set to 0 in this case.

@Reflexe
Copy link
Member Author

Reflexe commented Nov 7, 2017

@qnebra, My bad. I forgot to commit some files.

@Reflexe
Copy link
Member Author

Reflexe commented Nov 8, 2017

@BaraMGB I think I've fixed the issue with resizing from the left. Can you test it again please?

SampleBuffer.

That solves problem with recording that caused samples to be moved and
messed up.

Thanks @BaraMGB for helping.
@BaraMGB
Copy link
Contributor

BaraMGB commented Nov 8, 2017

Okay, tested. Works.

Next problems:

  1. When I start the recording in the middle of the TCO:
    bildschirmfoto von 2017-11-08 23-32-46
    The recorded sample moved to the beginning of the TCO:
    bildschirmfoto von 2017-11-08 23-33-17

  2. Recording in a loop doesn't work at all. When the Playhead moves back to the beginning of the loop, the recording stops and goes into the play mode.

  3. We should find a way for the user to choose the channel(s). When I want to record my voice I use only the left channel of my interface. But in the current implementation I have my voice only in the left speaker.

Previously, begining record in any position would result the data being
in the end of the TCO.

@see #3947 (comment)

Thanks to @BaraMGB :)
`updateMenu`, use a virtual function overriden by every Track
implemetation.
input channel configurations. And support recording of one channel and
converting it to two.

The user would be able to set their input config per track, or globally.
For each recorded sampletrack, the recorded will get the channel config
and will duplicate the samples from one channel to the other in a case
of mono input.
@Reflexe
Copy link
Member Author

Reflexe commented Nov 11, 2017

Current issues:

  • Record button does not work (Press record, press play)
  • Loops don't work more than once (See @BaraMGB's comment)
  • Problem with record not triggered:
    • Create a track, start recording from in the middle.
    • Now rerecord it from the start.
    • The result: The track would not get recorded until it reached the previous recording (Thanks to @BaraMGB)

@BaraMGB
Copy link
Contributor

BaraMGB commented Nov 13, 2017

Here is a little bug, yet. When you recording start in the middle of the TCO you add a startTimeOffset() now. This is correct. But now: If you wanna record in this TCO the recording don't start at the beginning of the TCO. The recording starts only if the Playhead reaches the start+startTimeOffset() position.

I hope you understand me.

@tresf tresf mentioned this pull request Nov 16, 2017
29 tasks
@Reflexe
Copy link
Member Author

Reflexe commented Aug 6, 2018

The last one has been solved (You just can't resize a track while recording).
I will check the two other ones in the next few days.

@PhysSong
Copy link
Member

PhysSong commented Aug 6, 2018

To be clear, I mean horizontal resizing(Shift + click and drag) of the track.

@Reflexe
Copy link
Member Author

Reflexe commented Aug 6, 2018 via email

@Reflexe
Copy link
Member Author

Reflexe commented Aug 7, 2018

I'm closing it for the a new feature/recording branch.

@Reflexe Reflexe closed this Aug 7, 2018
@PhysSong PhysSong mentioned this pull request Aug 9, 2018
11 tasks
PhysSong pushed a commit to PhysSong/lmms that referenced this pull request Dec 2, 2018
Previously, begining record in any position would result the data being
in the end of the TCO.

@see LMMS#3947 (comment)

Thanks to @BaraMGB :)
PhysSong pushed a commit to PhysSong/lmms that referenced this pull request Dec 2, 2018
Previously, begining record in any position would result the data being
in the end of the TCO.

@see LMMS#3947 (comment)

Thanks to @-BaraMGB :)
PhysSong pushed a commit to PhysSong/lmms that referenced this pull request Feb 24, 2019
Previously, begining record in any position would result the data being
in the end of the TCO.

@see LMMS#3947 (comment)

Thanks to @-BaraMGB :)
PhysSong pushed a commit that referenced this pull request Mar 11, 2019
Previously, begining record in any position would result the data being
in the end of the TCO.

@see #3947 (comment)

Thanks to @-BaraMGB :)
PhysSong pushed a commit to PhysSong/lmms that referenced this pull request Mar 11, 2019
Previously, begining record in any position would result the data being
in the end of the TCO.

@see LMMS#3947 (comment)

Thanks to @-BaraMGB :)
PhysSong pushed a commit to PhysSong/lmms that referenced this pull request Mar 11, 2019
Previously, begining record in any position would result the data being
in the end of the TCO.

@see LMMS#3947 (comment)

Thanks to @-BaraMGB :)
PhysSong pushed a commit to PhysSong/lmms that referenced this pull request Mar 12, 2019
Previously, begining record in any position would result the data being
in the end of the TCO.

@see LMMS#3947 (comment)

Thanks to @-BaraMGB :)
PhysSong pushed a commit to PhysSong/lmms that referenced this pull request Mar 12, 2019
Previously, begining record in any position would result the data being
in the end of the TCO.

@see LMMS#3947 (comment)

Thanks to @-BaraMGB :)
Reflexe added a commit to Reflexe/lmms that referenced this pull request May 26, 2019
Previously, begining record in any position would result the data being
in the end of the TCO.

@see LMMS#3947 (comment)

Thanks to @-BaraMGB :)
Reflexe added a commit to Reflexe/lmms that referenced this pull request May 26, 2019
Previously, begining record in any position would result the data being
in the end of the TCO.

@see LMMS#3947 (comment)

Thanks to @-BaraMGB :)
@Reflexe Reflexe mentioned this pull request May 31, 2019
11 tasks
PhysSong pushed a commit to PhysSong/lmms that referenced this pull request Jul 22, 2019
Previously, begining record in any position would result the data being
in the end of the TCO.

@see LMMS#3947 (comment)

Thanks to @-BaraMGB :)
@LostRobotMusic LostRobotMusic mentioned this pull request Dec 15, 2019
Reflexe added a commit to Reflexe/lmms that referenced this pull request Aug 1, 2020
Previously, begining record in any position would result the data being
in the end of the TCO.

@see LMMS#3947 (comment)

Thanks to @-BaraMGB :)
PhysSong pushed a commit to PhysSong/lmms that referenced this pull request Nov 21, 2020
Previously, begining record in any position would result the data being
in the end of the TCO.

@see LMMS#3947 (comment)

Thanks to @-BaraMGB :)
PhysSong pushed a commit to PhysSong/lmms that referenced this pull request Nov 21, 2020
Previously, begining record in any position would result the data being
in the end of the TCO.

@see LMMS#3947 (comment)

Thanks to @-BaraMGB :)
PhysSong pushed a commit to PhysSong/lmms that referenced this pull request Nov 21, 2020
Previously, begining record in any position would result the data being
in the end of the TCO.

@see LMMS#3947 (comment)

Thanks to @-BaraMGB :)
PhysSong pushed a commit to PhysSong/lmms that referenced this pull request Nov 21, 2020
Previously, begining record in any position would result the data being
in the end of the TCO.

@see LMMS#3947 (comment)

Thanks to @-BaraMGB :)
PhysSong pushed a commit to PhysSong/lmms that referenced this pull request Dec 4, 2020
Previously, begining record in any position would result the data being
in the end of the TCO.

@see LMMS#3947 (comment)

Thanks to @-BaraMGB :)
PhysSong pushed a commit to PhysSong/lmms that referenced this pull request Dec 8, 2020
Previously, begining record in any position would result the data being
in the end of the TCO.

@see LMMS#3947 (comment)

Thanks to @-BaraMGB :)
PhysSong pushed a commit to PhysSong/lmms that referenced this pull request Dec 27, 2020
Previously, begining record in any position would result the data being
in the end of the TCO.

@see LMMS#3947 (comment)

Thanks to @-BaraMGB :)
PhysSong pushed a commit to PhysSong/lmms that referenced this pull request Dec 27, 2020
Previously, begining record in any position would result the data being
in the end of the TCO.

@see LMMS#3947 (comment)

Thanks to @-BaraMGB :)
PhysSong pushed a commit to PhysSong/lmms that referenced this pull request Jan 25, 2021
Previously, begining record in any position would result the data being
in the end of the TCO.

@see LMMS#3947 (comment)

Thanks to @-BaraMGB :)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.