Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
112 commits
Select commit Hold shift + click to select a range
8fd89ee
SampleTrack: Uncomment disabled recording-related code.
Reflexe Nov 6, 2017
e86fd69
SampleTrack: Fix TCO not being played on the first tick (if it starts on
Reflexe Nov 6, 2017
34eb63c
AudioJack: Basic implementation of capture (without AUDIO_PORT_SUPPORT)
Reflexe Nov 6, 2017
1720fcd
Mixer & PlayHandle: Support PlayHandle without audioPort and set
Reflexe Nov 6, 2017
7074ac8
Mixer -> pushInputFrames: Add an option to automaticly normalize input
Reflexe Nov 7, 2017
86eb13f
AudioPulseAudio: Switch playback sample type to float and add capture
Reflexe Nov 8, 2017
45a484a
Track -> SampleTrack: Do not save start time offset for empty
Reflexe Nov 8, 2017
c4b69a3
AudioJack: Allocate and deallocate m_tempInBufs.
Reflexe Nov 8, 2017
0a9debc
SampleTrack: Make sure an empty TCO with isRecord would still be
Reflexe Nov 8, 2017
f72c5d9
SampleTrack: Reset the start time offset when importing a new
Reflexe Nov 8, 2017
5241b4b
SampleRecordHandle: Apply start offset to reocrded TCO.
Reflexe Nov 9, 2017
55029bd
Track, TrackView: Instead of trying every possible `dynamic_cast` in
Reflexe Nov 11, 2017
5229868
SampleTrack Recording: Add per SampleTrack and a global fallback for the
Reflexe Jul 30, 2018
e290203
Editor -> Style: Reorder editor buttons.
Reflexe Nov 11, 2017
48fea61
SampleTrack -> RecordingChannel: Remove the default option, instead, all
Reflexe Nov 12, 2017
6feeb4a
SampleTrack: Change recordingChannel menu label.
Reflexe Nov 12, 2017
1bb14b5
SampleTrack: In a case of recording, play a sample TCO even if its
Reflexe Nov 17, 2017
cbd669c
SampleRecordHandle: Obtain the offset to the record with a parameter
Reflexe Nov 17, 2017
ef9d9e8
AudioJack: Fix a deadblock on exporting a sample with different sample
Reflexe Dec 2, 2017
31a69dd
SongEditor: Hide the global channel selection toolbox when capture
Reflexe Dec 2, 2017
52eef80
SongEditor: Hide the record button.
Reflexe Dec 9, 2017
1e9845f
Bugfix - SampleTrack -> Load & Save: Fix recorded sample track not being
Reflexe Dec 16, 2017
7b49167
Bugfix - SampleTrack -> Play: Fix sample track not being played in the
Reflexe Dec 16, 2017
333ba57
SampleTrack -> Recording: Enable per-track record setting and
Reflexe Dec 16, 2017
16dc30b
SampleTrack: On project save, save the values of SampleTrack::m_record
Reflexe Dec 17, 2017
0b2d8a7
SampleTrack -> Minor: Reorder the constructor initialization order to
Reflexe Dec 17, 2017
75f84d6
Travis: Use SDL2 on Windows.
Reflexe Dec 23, 2017
70f2046
Travis -> InstallRaw: Fix Shellcheck warnings.
Reflexe Dec 25, 2017
96ccbfe
Travis -> Linux: Use SDL2 by default.
Reflexe Dec 25, 2017
5f68c8b
CMake -> Install: Install SDL2.dll instead of SDL.dll.
Reflexe Dec 25, 2017
acc1b8e
AudioJack: Connect capture stream to LMMS by default.
Reflexe Feb 24, 2018
715778f
AudioSdl -> Recording - Bugfix: Due to spec.sampleRate being wrong,
Reflexe Feb 24, 2018
79cddac
Style -> SampleTrack Recording: Paint recorded sampletrack red (intead
Reflexe Mar 31, 2018
c881c14
basics: Change sampleFrame to `std::array<sample_t, DEFAULT_CHANNELS>`
Reflexe Apr 9, 2018
84cea2b
SampleBuffer: Internally change buffer to std::vector and support
Reflexe Apr 9, 2018
f394a59
SampleRecordHandle and SampleTrack: Support in-recording updating and
Reflexe Apr 9, 2018
e47cdd2
SampleBuffer: Work around compilation error with libsamplerate 0.1.8
Reflexe Apr 29, 2018
ad3a03e
Recording and SampleTrack: Remove setSampleBuffer and introduce
Reflexe May 7, 2018
7e9a578
MemoryManager: Add == and != operators for MmAllocator.
Reflexe May 7, 2018
ee5981d
Recording: Don't apply masterGain for input frames.
Reflexe May 8, 2018
7118380
SampleTCO -> recording: Export is_record attribute for future loading.
Reflexe May 8, 2018
d588c56
SampleBuffer: fix resampleing error: null output data.
Reflexe May 9, 2018
1b7660d
Cleanup for next commit: Remove the unused AudioSampleRecorder.
Reflexe May 17, 2018
a5b684c
SampleBuffer: Remove the god function "update" and split it into a
Reflexe May 18, 2018
53d3b4c
Mixer: Fix another crash with play handle without an audioPort.
Reflexe May 18, 2018
c615235
SampleRecordHandle: Tell mixer to remove us when we done. With
Reflexe May 18, 2018
58314a4
AudioPortAudio: Support recording.
Reflexe May 19, 2018
0aab43a
SampleTrack: Move per-track slots from SampleTCO to SampleTrack.
Reflexe May 19, 2018
c39ccbb
Song -> Recording with loop: support creating of recording tcos in
Reflexe May 19, 2018
3d9efbb
SampleRecordHandle: Fix a bug when even when not recording, a track set
Reflexe May 19, 2018
f4a70a7
SampleBuffer -> Samplerate - Fix two sample rate issues:
Reflexe May 22, 2018
b1ffa19
AudioJack: Use std::vector for buffer
Reflexe May 23, 2018
210423f
SampleBuffer: Don't use sharedObject
Reflexe May 23, 2018
90c9b74
SampleBuffer: Use JournallingObject
Reflexe Jul 30, 2018
79c20bc
SampleBuffer: Don't normalize any SampleBuffer's sample rate to the
Reflexe May 23, 2018
a26a8df
Windows -> Recording: Enable jack.
Reflexe May 24, 2018
196f000
Travis: Install jack on win32 builds for its headers.
Reflexe May 26, 2018
d0385d6
Song: Fix loops and recording.
Reflexe May 26, 2018
0132e33
Win32 Installer -> Jack: Try to bundle jack installer.
Reflexe May 26, 2018
2ccd530
Support Jack on Windows + Bundled jack Installer (#6)
Reflexe May 26, 2018
ab9a2a3
SampleBuffer: Use `resetData` instead of `beginBufferChange` when
Reflexe Jun 1, 2018
8166e95
SampleBuffer: Make `frames()` thread-safe.
Reflexe Jun 1, 2018
0ba71ca
SampleBuffer & SampleTCOView: Cache visualization while recording.
Reflexe Jun 2, 2018
a356e78
PulseAudio: Disable recording since it produces voices from hell.
Reflexe Jun 2, 2018
6fe3267
AudioSdl: Disable recording in linux since it have a very high latency
Reflexe Jun 2, 2018
3a43158
SampleTrack: Avoid crashes while recording by locking the mixer before
Reflexe Jun 2, 2018
a056dfb
SampleTrackView: Fix visualization not being cleared between recording
Reflexe Jun 2, 2018
d11c826
SamplePlayHandle: Fix export issues by correctly calculating
Reflexe Jun 2, 2018
09f0b0d
SampleTCOView: Implement caching for visualization.
Reflexe Jun 9, 2018
d2d8bd7
SampleTCO -> Recording: Block resize and move actions while recording.
Reflexe Jun 9, 2018
b1fed89
SampleBuffer -> SoundFile: Support mono files, show a warning for
Reflexe Jun 10, 2018
b5123e6
SampleBuffer -> Recording: Use less blocking locks with addData and
Reflexe Jun 11, 2018
8121812
SampleBuffer: Fix mono sample decoding
lukas-w Jul 30, 2018
a4efebc
SampleBuffer::play: Fix freq factor calculation
lukas-w Jul 30, 2018
013d9f4
Remove bundled Jack headers, use system headers instead
lukas-w Jul 30, 2018
46d2233
CMake: Fix finding jack when cross-compiling with non-standard CMake
lukas-w Aug 5, 2018
67d5c77
Fix PatMan patch loading
PhysSong Aug 4, 2018
b6b61eb
Fix setting sample buffer name
PhysSong Aug 4, 2018
7d8d130
Use CMake's file command to download JACK installer
PhysSong Aug 5, 2018
21b9569
MmAllocator: add missing constructors
PhysSong Aug 5, 2018
8200efb
Improve JACK finding logic
PhysSong Aug 5, 2018
dd04ef7
Don't try to resample empty data
PhysSong Aug 6, 2018
60cf294
Fix remaining file name reset issues
PhysSong Aug 6, 2018
e98b133
Fix JACK installer download
PhysSong Aug 14, 2018
2175eac
Improve JACK installation on Windows
PhysSong Aug 14, 2018
6e76182
SampleBuffer: Don't treat an empty file as an error
Reflexe Aug 12, 2018
ca9be24
Bugfix -> SampleBuffer: To avoid arithmetic exception, userWaveSample
Reflexe Aug 13, 2018
1c9b53a
Bugfix -> SampleBuffer: Don't unlock the mixer when it has not been l…
Reflexe Aug 13, 2018
6ee074d
SampleBuffer: Disable automatic up-sampling to the mixer's sample rate.
Reflexe Aug 19, 2018
87239ac
Fix TripleOscillator preset previewing due to nonexistent waveform files
PhysSong Sep 20, 2018
283625c
SampleBuffer: use the RAII pattern when changing its data
PhysSong Nov 22, 2018
3a47ded
LmmsBasics: Move LoopMode here from SampleBuffer.
Reflexe May 7, 2019
e206254
Mixer: Introduce `RequestChangesGuard`: a RAII verion of
Reflexe May 7, 2019
5cfc4a3
SampleBuffer: Seperate the class into 3 internal classes.
Reflexe May 7, 2019
d65c1d0
Oscillator: include lmms_math.h.
Reflexe May 7, 2019
00acb14
Introduce Threading.h and runAsync: std::async using
Reflexe May 22, 2019
aac5600
Introduce UpdatingValue: thread-safe automatically updated value.
Reflexe May 22, 2019
4082d78
Mixer: Add runWhileNotRendering helper.
Reflexe May 22, 2019
67186e2
Engine: Delete the mixer last in order to be able to use requestChanges
Reflexe May 22, 2019
6f36515
SampleBufferPlayInfo: Add m_maybeAudiofile.
Reflexe May 22, 2019
0f8c6d6
Track::createTCO: avoid creating tcos while rendering.
Reflexe May 22, 2019
855b070
SampleBuffer: Make setX functions async, remove get functions
Reflexe May 22, 2019
8dc1475
SampleBuffer & SampleTCO visualization: visualize async only
Reflexe May 22, 2019
1c42efa
Track: put mixer syncs in tco remove/add in order to avoid
Reflexe May 22, 2019
98d1062
SampleRecordHandle: move calls to SampleBuffer's methods
Reflexe May 22, 2019
cd6ad7a
SampleRecordHandle: Add guard before setting startRecordTimeOffset
Reflexe May 23, 2019
7d8fdff
Threading: Add runAccordingToLaunchType helper that will run
Reflexe May 23, 2019
cde4baa
SampleBuffer: Support setX sync operation instead of only async.
Reflexe May 23, 2019
ab180b0
SampleTrack: use sync version of SampleBuffer's setX in order to avoid
Reflexe May 23, 2019
91c6e96
Use LMMS_EXPORT in order to resolve MSVC problems.
Reflexe May 24, 2019
a7236e4
SampleTrack -> QMutex: use tryLock instead of tryLock.
Reflexe May 25, 2019
444e638
AudioFileProcessor: fix saving/loading problems.
Reflexe May 25, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Song: Fix loops and recording.
  • Loading branch information
Reflexe committed May 27, 2019
commit d0385d623ea089bde9c8da33fc29a58e9f3bcc11
2 changes: 1 addition & 1 deletion include/SampleTrack.h
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ public slots:
void updateTcos();
void setPlayingTcos( bool isPlaying );
void updateEffectChannel();
void beforeRecord ();
void beforeRecordOn (MidiTime time);
void toggleRecord();
void playbackPositionChanged();

Expand Down
2 changes: 1 addition & 1 deletion include/Song.h
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,7 @@ public slots:
void addBBTrack();

signals:
void beforeRecord ();
void beforeRecordOn (MidiTime time);

private slots:
void insertBar();
Expand Down
13 changes: 7 additions & 6 deletions src/core/Song.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ Song::Song() :
this, SLOT( masterPitchChanged() ) );*/

qRegisterMetaType<Note>( "Note" );
qRegisterMetaType<MidiTime>("MidiTime");
setType( SongContainer );
}

Expand Down Expand Up @@ -263,9 +264,6 @@ void Song::processNextBuffer()
m_vstSyncController.setPlaybackJumped( true );

emit updateSampleTracks();

if (isRecording ())
emit beforeRecord ();
}
}

Expand All @@ -274,6 +272,11 @@ void Song::processNextBuffer()
m_vstSyncController.setPlaybackJumped( true );
m_playPos[m_playMode].setJumped( false );
}

if (isRecording())
{
emit beforeRecordOn(getPlayPos());
}

f_cnt_t framesPlayed = 0;
const float framesPerTick = Engine::framesPerTick();
Expand Down Expand Up @@ -350,7 +353,7 @@ void Song::processNextBuffer()

if (isRecording())
{
emit beforeRecord ();
emit beforeRecordOn(getPlayPos());
}
emit updateSampleTracks();
}
Expand Down Expand Up @@ -560,8 +563,6 @@ void Song::record()

void Song::playAndRecord()
{
emit beforeRecord ();

playSong();
m_recording = true;
}
Expand Down
7 changes: 4 additions & 3 deletions src/tracks/SampleTrack.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -564,7 +564,7 @@ SampleTrack::SampleTrack( TrackContainer* tc ) :
m_effectChannelModel.setRange( 0, Engine::fxMixer()->numChannels()-1, 1);

connect( &m_effectChannelModel, SIGNAL( dataChanged() ), this, SLOT( updateEffectChannel() ) );
connect (Engine::getSong (), SIGNAL(beforeRecord()), this, SLOT(beforeRecord()));
connect (Engine::getSong (), SIGNAL(beforeRecordOn(MidiTime)), this, SLOT(beforeRecordOn(MidiTime)));


//care about positionmarker
Expand Down Expand Up @@ -777,7 +777,8 @@ void SampleTrack::setPlayingTcos( bool isPlaying )
}
}

void SampleTrack::beforeRecord() {
void SampleTrack::beforeRecordOn(MidiTime time)
{
if (isRecord ()) {
bool isRecordTCOExist = false;

Expand All @@ -792,7 +793,7 @@ void SampleTrack::beforeRecord() {
auto fallbackRecordTCO = static_cast<SampleTCO*>(createTCO (0));

fallbackRecordTCO->setRecord (true);
fallbackRecordTCO->movePosition (Engine::getSong ()->getPlayPos (Song::Mode_PlaySong));
fallbackRecordTCO->movePosition (time);
// fallbackRecordTCO->setSamplePlayLength (Engine::framesPerTick());
fallbackRecordTCO->changeLength (1);
fallbackRecordTCO->setSampleStartFrame (0);
Expand Down