Unified · Split
| @@ -61,4 +61,4 @@ void tCrusher_setSamplingRatio (tCrusher* const, float ratio); · 60 unmodified lines | |||
| 61 | 61 | ||
| 62 | #endif // LEAF_WAVEFOLDER_H_INCLUDED | 62 | #endif // LEAF_WAVEFOLDER_H_INCLUDED |
| 63 | 63 | ||
| 64 | //============================================================================== | 64 | //============================================================================== |
| @@ -81,4 +81,4 @@ void tCrusher_setRound (tCrusher* const c, float rnd) · 80 unmodified lines | |||
| 81 | void tCrusher_setSamplingRatio (tCrusher* const c, float ratio) | 81 | void tCrusher_setSamplingRatio (tCrusher* const c, float ratio) |
| 82 | { | 82 | { |
| 83 | c->srr = ratio; | 83 | c->srr = ratio; |
| 84 | } | 84 | } |
| @@ -451,6 +451,12 @@ · 450 unmodified lines | |||
| 451 | #ifndef JucePlugin_IAAName | 451 | #ifndef JucePlugin_IAAName |
| 452 | #define JucePlugin_IAAName "pumusic: LEAF" | 452 | #define JucePlugin_IAAName "pumusic: LEAF" |
| 453 | #endif | 453 | #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_MaxNumInputChannels | 460 | #ifndef JucePlugin_MaxNumInputChannels |
| 455 | #define JucePlugin_MaxNumInputChannels 2 | 461 | #define JucePlugin_MaxNumInputChannels 2 |
| 456 | #endif | 462 | #endif |
| @@ -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"> |
| @@ -42,16 +42,16 @@ void LEAFTest_init (float sampleRate, int blockSize) · 41 unmodified lines | |||
| 42 | { | 42 | { |
| 43 | // Init and set play loop | 43 | // 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 play | 56 | // 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 ms | 113 | tSampler_setEnd(&samp[i], end % buff.length); // 10 - 1010 ms |
| 114 | } | 114 | } |
| 115 | } | 115 | } |
| 116 | 116 | ||
| 117 | } | 117 | } |
| 118 | 118 | ||