Mapping keys to samples

midi

#1

I'm trying to map samples to keys, with each pad on my nanoPAD2 corresponding to a different sample, modified with pots or CC. I'm sure someone's done this already, but I can't seem to find any patches for it. Can someone point me in a direction to get me started?


#2

this: https://sebiik.github.io/community.axoloti.com.backup/t/configurable-sd-card-sample-player-object/1843 works quite well for me.

i am not sure what you mean by "modified with pots or CC"? if you want to modify the speed or playing direction of the sample you have to load them into sdram instead, since reading from sdcard directly does not allow this


#3

Thank you! Can I store them on SDcard, then move them to SDRAM as required?

...and that patch doesn't even load, and doesn't seem compatible with Patcher 1.0.10+?


#4

no, you will have to decide beforehand what you need. if you need them in sdram for flexible playback etc. you will have to load the samples into a table, you can then read the table faster slower in reverse etc.
you can load files into tables on runtime from sdcard with table/load, but it will take some time, during which you cannot playback the table...

for simple playback that object linked in the other thread works here on current firmware. it is a bit fiddly to get the right config file, and put it into the right spot on the sdcard.


#5

Yeah, I don't understand what the directory structure is supposed to be. It seems like the answer is to follow the whole discussion? I dunno. I guess I'll try something else.


#6

i will write you back later, when i have my axoloti...(will check the sdcard content and see if i can clear things up)


#7

ok, i had a look.

it seems that the samples need to be in the root directory, along with the SAMPLER.CFG file. the file itself looks like in the screenshot:

the patch to playback the files then could look something like this, note that you will need the object to be in your objects folder, and reload libraries...


#8

Hey, thanks! I'm gonna work with this and see what I can get it to do.


#9

cool! note that my sample_trigger object is slightly modded, you won't have the playmode input on yours :slight_smile:


#10

My sample_trigger object just throws a pile of Javascript errors :frowning:

org.simpleframework.xml.core.ElementException: Element 'obj.normal' does not have a match in class axoloti.PatchGUI at line 3
org.simpleframework.xml.core.ElementException: Element 'obj.normal' does not have a match in class axoloti.PatchGUI at line 3
at org.simpleframework.xml.core.Composite.readElement(Composite.java:527)
at org.simpleframework.xml.core.Composite.readElements(Composite.java:445)
at org.simpleframework.xml.core.Composite.access$400(Composite.java:59)
at org.simpleframework.xml.core.Composite$Builder.read(Composite.java:1383)
at org.simpleframework.xml.core.Composite.read(Composite.java:201)
at org.simpleframework.xml.core.Composite.read(Composite.java:148)
at org.simpleframework.xml.core.Traverser.read(Traverser.java:92)
at org.simpleframework.xml.core.Persister.read(Persister.java:625)
at org.simpleframework.xml.core.Persister.read(Persister.java:606)
at org.simpleframework.xml.core.Persister.read(Persister.java:584)
at org.simpleframework.xml.core.Persister.read(Persister.java:543)
at org.simpleframework.xml.core.Persister.read(Persister.java:521)
at org.simpleframework.xml.core.Persister.read(Persister.java:426)
at axoloti.PatchGUI.OpenPatchInvisible(PatchGUI.java:1003)
at axoloti.PatchGUI.OpenPatch(PatchGUI.java:1025)
at axoloti.FileUtils.Open(FileUtils.java:166)
at axoloti.menus.FileMenu.jMenuOpenActionPerformed(FileMenu.java:255)
at axoloti.menus.FileMenu.access$200(FileMenu.java:51)
at axoloti.menus.FileMenu$3.actionPerformed(FileMenu.java:107)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2022)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2348)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)
at javax.swing.AbstractButton.doClick(AbstractButton.java:376)
at javax.swing.AbstractButton.doClick(AbstractButton.java:356)
at javax.swing.plaf.basic.BasicMenuItemUI$Actions.actionPerformed(BasicMenuItemUI.java:802)
at javax.swing.SwingUtilities.notifyAction(SwingUtilities.java:1663)
at javax.swing.JComponent.processKeyBinding(JComponent.java:2882)
at javax.swing.JMenuBar.processBindingForKeyStrokeRecursive(JMenuBar.java:699)
at javax.swing.JMenuBar.processBindingForKeyStrokeRecursive(JMenuBar.java:706)
at javax.swing.JMenuBar.processBindingForKeyStrokeRecursive(JMenuBar.java:706)
at javax.swing.JMenuBar.processKeyBinding(JMenuBar.java:677)
at javax.swing.KeyboardManager.fireBinding(KeyboardManager.java:307)
at javax.swing.KeyboardManager.fireKeyboardAction(KeyboardManager.java:293)
at javax.swing.JComponent.processKeyBindingsForAllComponents(JComponent.java:2974)
at javax.swing.JComponent.processKeyBindings(JComponent.java:2966)
at javax.swing.JComponent.processKeyEvent(JComponent.java:2845)
at java.awt.Component.processEvent(Component.java:6310)
at java.awt.Container.processEvent(Container.java:2236)
at java.awt.Component.dispatchEventImpl(Component.java:4889)
at java.awt.Container.dispatchEventImpl(Container.java:2294)
at java.awt.Component.dispatchEvent(Component.java:4711)
at java.awt.KeyboardFocusManager.redispatchEvent(KeyboardFocusManager.java:1954)
at java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(DefaultKeyboardFocusManager.java:806)
at java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(DefaultKeyboardFocusManager.java:1074)
at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(DefaultKeyboardFocusManager.java:945)
at java.awt.DefaultKeyboardFocusManager.dispatchEvent(DefaultKeyboardFocusManager.java:771)
at java.awt.Component.dispatchEventImpl(Component.java:4760)
at java.awt.Container.dispatchEventImpl(Container.java:2294)
at java.awt.Window.dispatchEventImpl(Window.java:2746)
at java.awt.Component.dispatchEvent(Component.java:4711)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758)
at java.awt.EventQueue.access$500(EventQueue.java:97)
at java.awt.EventQueue$3.run(EventQueue.java:709)
at java.awt.EventQueue$3.run(EventQueue.java:703)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:90)
at java.awt.EventQueue$4.run(EventQueue.java:731)
at java.awt.EventQueue$4.run(EventQueue.java:729)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:728)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)


#11

ok, did you put both files from the other thread into the same directory? so that the sample_trigger.axo can find the .h file?


#12

Yep. They’re right next to each other in their own directory. Oh, wait! can they be in their own directory? Or do they have to be up a level?


#13

they have to be in the same directory. no separate directories. that means they can be in objects/sampleplayer/ for example but both files have to be in there...

anyways if it still does not work, can you try my modded version?

sample_trigger.axo (4.4 KB)