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
61 61
62#endif // LEAF_WAVEFOLDER_H_INCLUDED62#endif // LEAF_WAVEFOLDER_H_INCLUDED
63 63
64//==============================================================================64//==============================================================================
LEAF/Src/leaf-crusher.c+1−1
@@ -81,4 +81,4 @@ void tCrusher_setRound (tCrusher* const c, float rnd) · 80 unmodified lines
81void tCrusher_setSamplingRatio (tCrusher* const c, float ratio)81void tCrusher_setSamplingRatio (tCrusher* const c, float ratio)
82{82{
83 c->srr = ratio;83 c->srr = ratio;
84}84}
LEAF_JUCEPlugin/JuceLibraryCode/AppConfig.h+6−0
@@ -451,6 +451,12 @@ · 450 unmodified lines
451#ifndef JucePlugin_IAAName451#ifndef JucePlugin_IAAName
452 #define JucePlugin_IAAName "pumusic: LEAF"452 #define JucePlugin_IAAName "pumusic: LEAF"
453#endif453#endif
454#ifndef JucePlugin_VSTNumMidiInputs
455 #define JucePlugin_VSTNumMidiInputs 16
456#endif
457#ifndef JucePlugin_VSTNumMidiOutputs
458 #define JucePlugin_VSTNumMidiOutputs 16
459#endif
454#ifndef JucePlugin_MaxNumInputChannels460#ifndef JucePlugin_MaxNumInputChannels
455 #define JucePlugin_MaxNumInputChannels 2461 #define JucePlugin_MaxNumInputChannels 2
456#endif462#endif
LEAF_JUCEPlugin/LEAF.jucer+1−1
@@ -8,7 +8,7 @@ · 7 unmodified lines
8 pluginIsSynth="0" pluginWantsMidiIn="1" pluginProducesMidiOut="0"8 pluginIsSynth="0" pluginWantsMidiIn="1" pluginProducesMidiOut="0"
9 pluginIsMidiEffectPlugin="0" pluginEditorRequiresKeys="0" pluginAUExportPrefix="LEAFAU"9 pluginIsMidiEffectPlugin="0" pluginEditorRequiresKeys="0" pluginAUExportPrefix="LEAFAU"
10 pluginRTASCategory="" aaxIdentifier="com.pumusic.LEAF" pluginAAXCategory="2"10 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"
12 displaySplashScreen="1" reportAppUsage="1" splashScreenColour="Dark"12 displaySplashScreen="1" reportAppUsage="1" splashScreenColour="Dark"
13 buildStandalone="1" enableIAA="0" cppLanguageStandard="11" companyCopyright="Princeton University"13 buildStandalone="1" enableIAA="0" cppLanguageStandard="11" companyCopyright="Princeton University"
14 pluginFormats="buildVST,buildAU,buildStandalone" pluginCharacteristicsValue="pluginWantsMidiIn">14 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
42 {42 {
43 // Init and set play loop43 // Init and set play loop
44 tSampler_init (&samp[i], &buff);44 tSampler_init (&samp[i], &buff);
45 tSampler_setMode (&samp[i], PlayLoop);45 tSampler_setMode (&samp[i], PlayLoop);
46 46
47 /*47 /*
48 float speed = ((getRandomFloat() < 0.5f) ? 0.5f : 1.f);48 float speed = ((getRandomFloat() < 0.5f) ? 0.5f : 1.f);
49 float dir = (getRandomFloat() < 0.5f) ? -1 : 1;49 float dir = (getRandomFloat() < 0.5f) ? -1 : 1;
50 50
51 tSampler_setRate(&samp[i], speed * dir);51 tSampler_setRate(&samp[i], speed * dir);
52 */52 */
53 53
54 tSampler_setRate(&samp[i], 1.f);54 tSampler_setRate(&samp[i], 1.f);
55 55
56 // Record and play56 // Record and play
57 tSampler_play(&samp[i]);57 tSampler_play(&samp[i]);
@@ -100,19 +100,19 @@ void LEAFTest_block (void) · 42 unmodified lines
100 100
101 val = getSliderValue("feedback");101 val = getSliderValue("feedback");
102 102
103 feedback = val;103 feedback = val;
104 104
105 for (int i = 0; i < NUM_GRAINS; i++)105 for (int i = 0; i < NUM_GRAINS; i++)
106 {106 {
107 if (getRandomFloat() < 0.01f)107 if (getRandomFloat() < 0.01f)
108 {108 {
109 tSampler_setStart(&samp[i], leaf.sampleRate * 0.05f + leaf.sampleRate * getRandomFloat() * 0.95f);109 tSampler_setStart(&samp[i], leaf.sampleRate * 0.05f + leaf.sampleRate * getRandomFloat() * 0.95f);
110 110
111 uint64_t end = (leaf.sampleRate * 0.05f + getRandomFloat() * leaf.sampleRate * 0.45f + samp[i].start);111 uint64_t end = (leaf.sampleRate * 0.05f + getRandomFloat() * leaf.sampleRate * 0.45f + samp[i].start);
112 112
113 tSampler_setEnd(&samp[i], end % buff.length); // 10 - 1010 ms113 tSampler_setEnd(&samp[i], end % buff.length); // 10 - 1010 ms
114 }114 }
115 }115 }
116 116
117}117}
118 118

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