History

Pre example.

mulshine committed 7 years ago

Commit 1bd52d61 parent 53cc69a5 files · +29 −23Browse files

Unified · Split

5 files
  1. LEAF/Inc/leaf-crusher.h +1 −1
  2. LEAF/Src/leaf-crusher.c +1 −1
  3. LEAF_JUCEPlugin/JuceLibraryCode/AppConfig.h +6 −0
  4. LEAF_JUCEPlugin/LEAF.jucer +1 −1
  5. LEAF_JUCEPlugin/Source/MyTest.cpp +20 −20
LEAF/Inc/leaf-crusher.h+1−1
@@ -61,4 +61,4 @@ void tCrusher_setSamplingRatio (tCrusher* const, float ratio); · 60 unmodified lines
6161
6262 #endif // LEAF_WAVEFOLDER_H_INCLUDED
6363
64−//==============================================================================
64+//==============================================================================
LEAF/Src/leaf-crusher.c+1−1
@@ -81,4 +81,4 @@ void tCrusher_setRound (tCrusher* const c, float rnd) · 80 unmodified lines
8181 void tCrusher_setSamplingRatio (tCrusher* const c, float ratio)
8282 {
8383 c->srr = ratio;
84−}
84+}
LEAF_JUCEPlugin/JuceLibraryCode/AppConfig.h+6−0
@@ -451,6 +451,12 @@ · 450 unmodified lines
451451 #ifndef JucePlugin_IAAName
452452 #define JucePlugin_IAAName "pumusic: LEAF"
453453 #endif
454+#ifndef JucePlugin_VSTNumMidiInputs
455+ #define JucePlugin_VSTNumMidiInputs 16
456+#endif
457+#ifndef JucePlugin_VSTNumMidiOutputs
458+ #define JucePlugin_VSTNumMidiOutputs 16
459+#endif
454460 #ifndef JucePlugin_MaxNumInputChannels
455461 #define JucePlugin_MaxNumInputChannels 2
456462 #endif
LEAF_JUCEPlugin/LEAF.jucer+1−1
@@ -8,7 +8,7 @@ · 7 unmodified lines
88 pluginIsSynth="0" pluginWantsMidiIn="1" pluginProducesMidiOut="0"
99 pluginIsMidiEffectPlugin="0" pluginEditorRequiresKeys="0" pluginAUExportPrefix="LEAFAU"
1010 pluginRTASCategory="" aaxIdentifier="com.pumusic.LEAF" pluginAAXCategory="2"
11− jucerVersion="5.4.1" companyName="Princeton University" companyEmail="mrmulshine@gmail.com"
11+ jucerVersion="5.4.3" companyName="Princeton University" companyEmail="mrmulshine@gmail.com"
1212 displaySplashScreen="1" reportAppUsage="1" splashScreenColour="Dark"
1313 buildStandalone="1" enableIAA="0" cppLanguageStandard="11" companyCopyright="Princeton University"
1414 pluginFormats="buildVST,buildAU,buildStandalone" pluginCharacteristicsValue="pluginWantsMidiIn">
LEAF_JUCEPlugin/Source/MyTest.cpp+20−20
@@ -42,16 +42,16 @@ void LEAFTest_init (float sampleRate, int blockSize) · 41 unmodified lines
4242 {
4343 // Init and set play loop
4444 tSampler_init (&samp[i], &buff);
45− tSampler_setMode (&samp[i], PlayLoop);
46−
45+ tSampler_setMode (&samp[i], PlayLoop);
46+
4747 /*
48− float speed = ((getRandomFloat() < 0.5f) ? 0.5f : 1.f);
48+ float speed = ((getRandomFloat() < 0.5f) ? 0.5f : 1.f);
4949 float dir = (getRandomFloat() < 0.5f) ? -1 : 1;
5050
51− tSampler_setRate(&samp[i], speed * dir);
52− */
53−
54− tSampler_setRate(&samp[i], 1.f);
51+ tSampler_setRate(&samp[i], speed * dir);
52+ */
53+
54+ tSampler_setRate(&samp[i], 1.f);
5555
5656 // Record and play
5757 tSampler_play(&samp[i]);
@@ -100,19 +100,19 @@ void LEAFTest_block (void) · 42 unmodified lines
100100
101101 val = getSliderValue("feedback");
102102
103− feedback = val;
104−
105− for (int i = 0; i < NUM_GRAINS; i++)
106− {
107− if (getRandomFloat() < 0.01f)
108− {
109− tSampler_setStart(&samp[i], leaf.sampleRate * 0.05f + leaf.sampleRate * getRandomFloat() * 0.95f);
110−
111− uint64_t end = (leaf.sampleRate * 0.05f + getRandomFloat() * leaf.sampleRate * 0.45f + samp[i].start);
112−
113− tSampler_setEnd(&samp[i], end % buff.length); // 10 - 1010 ms
114− }
115− }
103+ feedback = val;
104+
105+ for (int i = 0; i < NUM_GRAINS; i++)
106+ {
107+ if (getRandomFloat() < 0.01f)
108+ {
109+ tSampler_setStart(&samp[i], leaf.sampleRate * 0.05f + leaf.sampleRate * getRandomFloat() * 0.95f);
110+
111+ uint64_t end = (leaf.sampleRate * 0.05f + getRandomFloat() * leaf.sampleRate * 0.45f + samp[i].start);
112+
113+ tSampler_setEnd(&samp[i], end % buff.length); // 10 - 1010 ms
114+ }
115+ }
116116
117117 }
118118

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t