From 46c9f8fcf6d8f9c7168a545cb9d694e7545a66e0 Mon Sep 17 00:00:00 2001 From: cnlohr Date: Mon, 29 Jun 2015 20:50:06 -0400 Subject: [PATCH 1/2] update DMX for recording --- RecorderPlugin.c | 14 ++++---------- dmx.conf | 7 +++++++ embedded8266/image.elf | Bin linearpie.conf | 0 4 files changed, 11 insertions(+), 10 deletions(-) mode change 100755 => 100644 embedded8266/image.elf mode change 100755 => 100644 linearpie.conf diff --git a/RecorderPlugin.c b/RecorderPlugin.c index 5ae41fc..ddd7555 100644 --- a/RecorderPlugin.c +++ b/RecorderPlugin.c @@ -140,22 +140,16 @@ static void PlaybackEvent(void * v, int samples, float * samps, int channel_ct) else force_white = 0; - if( rp->TimeSinceStart > rp->BypassLength ) + int r = fwrite( samps, channel_ct * sizeof( float ), samples, rp->fRec ); + if( r != samples ) { - rp->DunBoop = 1; - } - else - { - int r = fwrite( samps, channel_ct * sizeof( float ), samples, rp->fRec ); - if( r != samples ) - { - StopRecording( rp ); - } + StopRecording( rp ); } } else { force_white = 0; + rp->DunBoop = 1; } } diff --git a/dmx.conf b/dmx.conf index eee1895..698f74c 100644 --- a/dmx.conf +++ b/dmx.conf @@ -1,5 +1,12 @@ outdrivers = DisplayDMX, OutputLinear, DisplayArray, RecorderPlugin + +play = 1 +buffer = 512 +player_filename = inchristalone.raw +recorder_filename = recfile.raw +recorder_bypass = 44100 + byte_offset = 32 ledoutamp = 1.0 leds = 4 diff --git a/embedded8266/image.elf b/embedded8266/image.elf old mode 100755 new mode 100644 diff --git a/linearpie.conf b/linearpie.conf old mode 100755 new mode 100644 From 2a60de01369249c5ef3d49b07c91039c056cd854 Mon Sep 17 00:00:00 2001 From: Laptop Date: Mon, 29 Jun 2015 22:17:31 -0400 Subject: [PATCH 2/2] Fix DMX plus actually stop recording add "White" function --- RecorderPlugin.c | 1 + dmx.conf | 4 +++- main.c | 2 ++ 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/RecorderPlugin.c b/RecorderPlugin.c index ddd7555..467d57b 100644 --- a/RecorderPlugin.c +++ b/RecorderPlugin.c @@ -130,6 +130,7 @@ static void PlaybackEvent(void * v, int samples, float * samps, int channel_ct) if( r != samples ) { StopRecording( rp ); + return; } rp->TimeSinceStart += samples; diff --git a/dmx.conf b/dmx.conf index 698f74c..3fcdab9 100644 --- a/dmx.conf +++ b/dmx.conf @@ -3,7 +3,7 @@ outdrivers = DisplayDMX, OutputLinear, DisplayArray, RecorderPlugin play = 1 buffer = 512 -player_filename = inchristalone.raw +player_filename = lora1.raw recorder_filename = recfile.raw recorder_bypass = 44100 @@ -25,3 +25,5 @@ firstval = 0 port = 7777 address = 192.168.0.245 + + diff --git a/main.c b/main.c index 75abcf9..cf8f198 100644 --- a/main.c +++ b/main.c @@ -55,11 +55,13 @@ int show_debug = 0; int show_debug_basic = 1; int gKey = 0; +extern int force_white; void HandleKey( int keycode, int bDown ) { char c = toupper( keycode ); if( c == 'D' && bDown ) show_debug = !show_debug; + if( c == 'W' ) force_white = bDown; if( c == '9' && bDown ) { gKey--; nf->base_hz = 55 * pow( 2, gKey / 12.0 ); ChangeNFParameters( nf ); } if( c == '-' && bDown ) { gKey++; nf->base_hz = 55 * pow( 2, gKey / 12.0 ); ChangeNFParameters( nf ); } if( c == '0' && bDown ) { gKey = 0; nf->base_hz = 55 * pow( 2, gKey / 12.0 ); ChangeNFParameters( nf ); }