shithub: leaf

Download patch

ref: 1bd52d6f273a6897ad8d9bf56d4dd22034e5ca68
parent: 53cc69afc79c8adb859f00cdb183612baa50a48e
author: mulshine <mulshine@princeton.edu>
date: Fri May 3 07:54:38 EDT 2019

Pre example.

--- a/LEAF/Inc/leaf-crusher.h
+++ b/LEAF/Inc/leaf-crusher.h
@@ -61,4 +61,4 @@
 
 #endif // LEAF_WAVEFOLDER_H_INCLUDED
 
-//==============================================================================
+//==============================================================================
--- a/LEAF/Src/leaf-crusher.c
+++ b/LEAF/Src/leaf-crusher.c
@@ -81,4 +81,4 @@
 void    tCrusher_setSamplingRatio (tCrusher* const c, float ratio)
 {
     c->srr = ratio;
-}
+}
--- a/LEAF_JUCEPlugin/JuceLibraryCode/AppConfig.h
+++ b/LEAF_JUCEPlugin/JuceLibraryCode/AppConfig.h
@@ -451,6 +451,12 @@
 #ifndef  JucePlugin_IAAName
  #define JucePlugin_IAAName                "pumusic: LEAF"
 #endif
+#ifndef  JucePlugin_VSTNumMidiInputs
+ #define JucePlugin_VSTNumMidiInputs       16
+#endif
+#ifndef  JucePlugin_VSTNumMidiOutputs
+ #define JucePlugin_VSTNumMidiOutputs      16
+#endif
 #ifndef  JucePlugin_MaxNumInputChannels
  #define JucePlugin_MaxNumInputChannels    2
 #endif
--- a/LEAF_JUCEPlugin/LEAF.jucer
+++ b/LEAF_JUCEPlugin/LEAF.jucer
@@ -8,7 +8,7 @@
               pluginIsSynth="0" pluginWantsMidiIn="1" pluginProducesMidiOut="0"
               pluginIsMidiEffectPlugin="0" pluginEditorRequiresKeys="0" pluginAUExportPrefix="LEAFAU"
               pluginRTASCategory="" aaxIdentifier="com.pumusic.LEAF" pluginAAXCategory="2"
-              jucerVersion="5.4.1" companyName="Princeton University" companyEmail="mrmulshine@gmail.com"
+              jucerVersion="5.4.3" companyName="Princeton University" companyEmail="mrmulshine@gmail.com"
               displaySplashScreen="1" reportAppUsage="1" splashScreenColour="Dark"
               buildStandalone="1" enableIAA="0" cppLanguageStandard="11" companyCopyright="Princeton University"
               pluginFormats="buildVST,buildAU,buildStandalone" pluginCharacteristicsValue="pluginWantsMidiIn">
--- a/LEAF_JUCEPlugin/Source/MyTest.cpp
+++ b/LEAF_JUCEPlugin/Source/MyTest.cpp
@@ -42,17 +42,17 @@
     {
         // Init and set play loop
         tSampler_init (&samp[i], &buff);
-        tSampler_setMode (&samp[i], PlayLoop);
-
+        tSampler_setMode (&samp[i], PlayLoop);
+
         /*
-        float speed = ((getRandomFloat() < 0.5f) ? 0.5f : 1.f);
+        float speed = ((getRandomFloat() < 0.5f) ? 0.5f : 1.f);
         float dir = (getRandomFloat() < 0.5f) ? -1 : 1;
         
-        tSampler_setRate(&samp[i], speed * dir);
-         */
-        
-        tSampler_setRate(&samp[i], 1.f);
+        tSampler_setRate(&samp[i], speed * dir);
+         */
         
+        tSampler_setRate(&samp[i], 1.f);
+        
         // Record and play
         tSampler_play(&samp[i]);
     }
@@ -100,19 +100,19 @@
     
     val = getSliderValue("feedback");
     
-    feedback = val;
-    
-    for (int i = 0; i < NUM_GRAINS; i++)
-    {
-        if (getRandomFloat() < 0.01f)
-        {
-            tSampler_setStart(&samp[i], leaf.sampleRate * 0.05f + leaf.sampleRate * getRandomFloat() * 0.95f);
-            
-            uint64_t end = (leaf.sampleRate * 0.05f + getRandomFloat() * leaf.sampleRate * 0.45f + samp[i].start);
-            
-            tSampler_setEnd(&samp[i],  end % buff.length); // 10 - 1010 ms
-        }
-    }
+    feedback = val;
+    
+    for (int i = 0; i < NUM_GRAINS; i++)
+    {
+        if (getRandomFloat() < 0.01f)
+        {
+            tSampler_setStart(&samp[i], leaf.sampleRate * 0.05f + leaf.sampleRate * getRandomFloat() * 0.95f);
+            
+            uint64_t end = (leaf.sampleRate * 0.05f + getRandomFloat() * leaf.sampleRate * 0.45f + samp[i].start);
+            
+            tSampler_setEnd(&samp[i],  end % buff.length); // 10 - 1010 ms
+        }
+    }
     
 }