Unsolved about audio loop player & preset
-
Hi,
I would like to know if there are any "tips & tricks" to be able to save the samples loaded on Audio Loop Player in the presets. I searched a bit in the documentation but I don't think I found anything to do this.I would mainly like to understand if it is possible to save a sample loaded inside Audio Loop Player to be able to distribute it in the presets, not only" factory presets" but also to be able to let end users do it too.
-
-
Call me: Lil Bump
-
@Mighty23 ok so heres a scrren snippet from HoriZEn, for one of the loop players:
As you can see there is a "name" at the top - this is just a text field that has a callback that loads the loop into the Audio Player... and it is this "name" that has SaveInPreset enabled.
- so in my case this "name" is populated from a custom tag-based loop browser - so it allows users to select "loops" and the browser populates the name and calls the name fields .changed() function
So with this fairly simple process you have a way of saving "factory" loops in presets and have them load on preset load.
Your only problem here is when the user drags a loop of their own into the loop player.... so you need to have a way of getting notified that this has happened and then setting the Name to = the users dragged in material - and here a broadcaster is you friend:
go read this thread:
-
@Lindon many thanks.
-
I made a "hybrid" Preset Browser to start the implementation and started adding the broadcaster.
Now I need to figure out which direction to continue, maybe I should use ""loadAudioFile"" ? Here is a Snippet; my goal is to save the file currently loaded in AudioLoopPlayer1 in the *.presets.HiseSnippet 2182.3ocyXszaibbDdFIMaVx0N9QbLxofwD4.U.AszZGGCKjrRTORDhjLgnrWuvXgQyY5grgF1MSO8HI50BvGxOfbJ.I+DxsbLWBzOk7SH2BPtroptaNOHGIQo30H7fzzUUc0e0it5p6tRQ.MIQHcbqcxjwTG2Wyq2DtZ31CILty96339PutRZBU4zYxXRRBMzw0c4eCx0s1JN5e+qmzgDS3AzbRNNetfEPOfMhoxo1cyeGKNdORH8D1nBR+gateffusHVjBHYYu0bFSBNkLfdDAEaIOG2GraHSIj8TDEMAjoiHbRughy4F4+bVBqeLEGrtSOPQFxNaOjEG1cpUl33350M2lW1Xyui2grPVF8ba+M0L7ymQQef6R2DjV+N.I2BPZECjdKudAR1XUNGDOOxaethJiHfqtHTLx5rzG+PusEfDbU6QjSo6IgAYyn4Gs1Zs7g+r5F0qCt6Dk+YDoeb+XS.1+W4OcxCnp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ad.bAXhb18FuRed7JiW+DOCb8wsx9+uD29dMM6FK8u7BU5+6b7d+OF36FnbrHEuHxgDHQEKrAst1CpDGPAjv4z3DrX1R3UlMiWaZwsdTdndvKgeVlqiicsLWeJyuWViQj.o3qBL2qGykenlBX2bcQ7ZdGhi8q3ILfluXeUPPYUM2De78chev8che38ch+h66D+n66D+k22I9w29DwCs1JUIFY1x53bX2c0WO00M6fe2kc9u.a0cTsC
-
In this version the code recognizes when a new sample is loaded and recognizes the path of the loaded file, in addition the file is saved in the presets and loaded in the LoopPlayer.
Now I would like to make this first approach "universal" so that the preset manager searches for the sample in a "generic" and OS-agnostic path. Could someone direct me?
This is the snippet of the "generic" but working implementation.
HiseSnippet 2412.3oc2YszbabbDdAoVESJ6X6DmpxwInxAnDZXBZEmTRUh.eFyxDznHjrhioKjA6N.XJt6Lalc.IgUopzg7CvW8s7CHWxwbS+TxobN2xQktmY1W3gDEqnTQAGr01S28z8W2SOcOrqRFvRSkJuZq8foILuZuseuoB83cGS4BuC2yq1a42UwRYZucllPSSYgd0ps5uEWs1Z2vy76ed+cnQTQ.qfjm2WH4Ari3wbcA0ts+LdTzAzP1C3wk39NsOLPJ1UFIm.Vxp9a5kPCNiNhcLEYaEeuZ2b+PtVp5ooZVpWsariLbZuwxKDV9+BdJePDC+nkWOPQVxGHiBQKFo5s6XdTX2LON0yqle2B+eUq++A9c3g7b5E3v6YVfTHQY7n1JUMuUqXdsJadaVx7VfIUqjIcCqI8998BT7DcwJn8bK+CEZlZHEf8xlhkWuUZtt+tRfCgtYL8L1AJ3ibIZ7Iat4FD3+b66sdOlVyEiRaBA4euTFeD6bVTiVMw0VGBKoZx4TEIZPjMQf7qIYJdDSuqLNQJfOZTOmi5fjUDrGMNIh8hDzxQUAGnE8nmydIBWgq5Us4smDxkGIkIcinSYpVfRLY2FUfPu4qF0M7QPFINNqZI45orBLDsaadjYYpxoqzHIBe4pKWMGviXMP.WwFQBlnTfqYUcE+YP.H89hQbAqYfhA4Z6njzv.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