Maybe Too Hard A Question ?



  • I had a look at HISE and there is an Audio Loop Player.
    I can drop a long wav in that has different chords played on different bars, set the Loop to 2 or 4 bars, set the sample pos start sample pos end
    A chord 2 bars:
    Looper.setSampleRange(192000, 384000);
    A# chord 2 bars:
    Looper.setSampleRange(384000, 576000);
    alt text
    Can this be scripted to assign that to a midi chord input. So when an A chord is played it will loop that section of the wav , then A# chord will loop another section synced to the DAW tempo and so on ?

    alt text



  • I found this that will play on C note input

    	if (Message.getNoteNumber() != 48)
    	    Message.ignoreEvent(true);
    

    Not familiar enough with java to get a chord with "and"

    function onNoteOn()
    {
    	if (Message.getNoteNumber() != 48 && 
    	    Message.getNoteNumber() != 52 && 
    	    Message.getNoteNumber() != 55)
    	    Message.ignoreEvent(true);
    }
     
    

    that just plays the sample with "any" of the notes and triples up playing the sample with all notes on.

    I found this one also that will allow users to load a sample.

    @Christoph-Hart said in How do you load samples into the sampler via scripting?:

    There is the "Audio Loop Player" sound generator which can load a single audio file and play it either as loop or as pitched note:

    HiseSnippet 1117.3oc4W0taiTCE0SRFUZfxxBKR7SqH9QVoR6jzVVDHDosaKDneD0TJHgPKtybShU8XG4wS6FVsOV7dviBuAf87QlYRl1lrr.RriTThOWe8btWeuG6zSJbgf.gDY81mOYLfrdG69S3pQ6OhP4ntOEY8t1GSBTfDGCs2jwjf.vCYYU8qM.VqVCE87Ge0dDFg6BYPHzEBpKbD0mpxP+kNeGkwNj3AmS8yM6s6z0Uv2WvDgZ9T01AMl3dEYHbBwLsJ1nqovMAHKG6sZug7pVW9q6twLOe+2rmFaXQbjanTBb0EZ2QV1V+o9wx9.OpRH6qHJPul16I7lzej3Ft4U2BcAMfdIChGzWyoXFcnf4YBdCZWtNsLf3BScyAg1eDk40KMsFfzqburjb03j7irOl5QmhmkreuHC3LOxmtspTjx0VVJWJ8rxQuZwz6g18ckzwpLKFt89In2B6hMhp7aUr2WnyLb0F9jqfCk5ASyTM2wwYcbaGmG+E0060AJ70DId2POp3GHWCCDRe7WhS8m34UvTyFEF1vrRlO5EayMw+z21+zSJtV+b8zkJ.LQyXPpnPflS9lIO+58h0piwMtg5oF03ywa2dm0i.FAzgiTZjVa0NFYbZNnqmFNdcvGIDiw8XjIfrwZ0eYBs1rLdkE7GQtDXEC5HnlMh9JIHa8jBQYjo6M5RWf3nRAO2DBMNyDKXWF08JrfiUi.7Mo4dk.yDDOLgiIQgz.JCZr9LYEmYxJo.9gLEkQ4fFa.gE.ylDho8fPtqhpe0B9IBEbJu4iq+h5qV+k0m0xfAkYxD0RAiAxxrZzTj2gaM4g9WBx00IeVHjNOc6Qwlq5KVyka7NPtIJ3c4T0oigoiiCxTDGzzfKOTVPkGMJXJYZYPy2QiRpJz81URlNxZEUTm8GlzCWnZDQ0MvOvtHVT1IuRdNYhOvdt5cjjvGB5jmTYTXMNDgb.2KcroTZpRNZJypFyr0RXVTIRDiVwN92ywDz7JVZcSgWHinJJlZNfJwftFnfbkQRhGPUSxe.1Rnv5bKGJTx9wBR2GZ2ipbGUNeqTBeMav+Cy2jyqVy9fAC.WUFYqYe3O9pd3zqFUdPJUhp8LkdP74RkUMd62R42e8eKE8Elb06ZP9Jonsxyk56uP4Cy+pLr7.NQmJ7xO+yDBkQUHCqWmCy2v3aBh3FIexyS+4rpVK3sXJ1Wja9281gUs+CtJyq+Fs+95BUWL5dO21ZkTN1m5OlokJuFX5p5DwfmBCH5ySmhdujbWkRWtkg7nNmALfDjql5i6bj9zYhb1p0kH9Zs3w2csG7Q1wzEaZtv++Pit5alZzmIBUZQtiIJI0HLcRnees1nKnYBmCLirjUEy8RhG6jJd0G3dNo+erDisLisRL1J03+JuCehqT7L236kXpkeqHDcbyiDgWU+Gg0iwsRuQhI23q03dlqqIY+IsPnx8n8R6wVKsGauzdryR6wmtzd7jk1iO6N7vbfxtgJgebqGB8WNfUhHA
    

    You can connect a AudioWaveformDisplay from your script interface to it. It's not 100% what you need, but it might be a good starting point (let me know if you get along with this).

    There will be a csv file with the same name as the wav that will have the start/end times in the wav for the different chords playing. So the script would need to read the csv and calculate the sample start/end pos.

    #,Name,Start,End,Length,Color
    R1,C,1.1.00,3.1.00,2.0.00,FF80C0
    R2,C,3.1.00,7.1.00,4.0.00,3776EB
    R3,C#,7.1.00,11.1.00,4.0.00,3776EB
    R4,D,11.1.00,15.1.00,4.0.00,3776EB
    R5,D#,15.1.00,19.1.00,4.0.00,3776EB
    

    https://mkyong.com/java/how-to-read-and-parse-csv-file-in-java/



  • This post is deleted!


  • You'd need to convert your CSV to a json file, but I'm not familiar with the audio loop player so I don't know if your idea is possible.



  • https://www.convertcsv.com/csv-to-json.htm

    So it can't parse it with the scripting ?
    I can do it with Lua http://lua-users.org/wiki/LuaCsv

    #,Name,Start,End,Length,Color
    R1,,1.1.00,3.1.00,2.0.00,FF80C0
    R2,A,3.1.00,5.1.00,2.0.00,E41A27
    R3,A#,5.1.00,7.1.00,2.0.00,E41A27
    R4,B,7.1.00,9.1.00,2.0.00,E41A27
    R5,C,9.1.00,11.1.00,2.0.00,E41A27
    R6,C#,11.1.00,13.1.00,2.0.00,E41A27
    
    [
     {
       "#": "R1",
       "Name": "",
       "Start": "1.1.00",
       "End": "3.1.00",
       "Length": "2.0.00",
       "Color": "FF80C0"
     },
     {
       "#": "R2",
       "Name": "A",
       "Start": "3.1.00",
       "End": "5.1.00",
       "Length": "2.0.00",
       "Color": "E41A27"
     },
     {
       "#": "R3",
       "Name": "A#",
       "Start": "5.1.00",
       "End": "7.1.00",
       "Length": "2.0.00",
       "Color": "E41A27"
     },
     {
       "#": "R4",
       "Name": "B",
       "Start": "7.1.00",
       "End": "9.1.00",
       "Length": "2.0.00",
       "Color": "E41A27"
     },
     {
       "#": "R5",
       "Name": "C",
       "Start": "9.1.00",
       "End": "11.1.00",
       "Length": "2.0.00",
       "Color": "E41A27"
     },
     {
       "#": "R6",
       "Name": "C#",
       "Start": "11.1.00",
       "End": "13.1.00",
       "Length": "2.0.00",
       "Color": "E41A27"
     },
    


  • You could convert a CSV string to an array with scripting. If you use the file system api you could read in the text file directly, but a json file is simpler to work with.



  • HISE looks great, it should be more popular but it's seems really quiet around here and hard to get information and help. The last release was 2018.
    The Reaper script request forum is very popular and helpful
    https://forum.cockos.com/showthread.php?t=109934&page=64
    Do you know anyone I can pay that will create a basic script I can work off or do you think I'm flogging a dead horse here ?



  • @MusoCity Last release was 5 hours ago 😉 I don't really understand the idea, but Lindon is the guy to ask for commissioning HISE work.



  • So Lindon is a forum user ?
    This is the version I have
    HISE 2.0.0
    @christophhart christophhart released this on Nov 19, 2018



  • @MusoCity That's the last release Christoph made binaries for. Since then there has been one other "tagged" release, v2.1.0

    But if you want to use the latest version then the scriptnode branch is the most up to date and the last commit was about 5 hours ago.

    Yes, @Lindon is a forum member.



  • @MusoCity -- mention his name and he will appear!!!



  • I asked in the Reaper forum and got a lot of help and code also.
    I think the users here are commercially based so it's hard to get any help, it's a shame as HISE is open source. I created the ReaTrak for Reaper with Lua scripting free for users and are always creating scripts for other users in the script request forum along with so many others doing the same so I might create a HISE thread over there and get the scripters there interested.



  • @MusoCity "commercially based"? "hard to get help"? - @d-healey has over 7K of posts helping people out last time I looked, I checked me too -- I have over 2K of posts, there's a ton of other people also helping out here.... so I could go on....

    Perhaps you haven't clearly defined your problem with your HISE implementation in a way we can help you?



  • Sorry, maybe it's just just a bit quiet here at the moment.
    If I want the audio loop player to loop a particular section of a wav file when I input midi notes 57+61+64 (A chord) and loop another section when I input 58+62+65 (A# chord).
    I want the audio loop player to also follow the host tempo.
    So basically the user will drop a wav into the audio loop player, the script will read the start/end time pos of the chord sections in the wav file from the csv of the same name. The bpm of the wav file will be in the filename.
    Guitar, Strum, Ev8 4-4 120bpm.wav
    Guitar, Strum, Ev8 4-4 120bpm.csv

    #,Name,Start,End,Length,Color
    R1,,1.1.00,3.1.00,2.0.00,FF80C0
    R2,A,3.1.00,5.1.00,2.0.00,E41A27
    R3,A#,5.1.00,7.1.00,2.0.00,E41A27
    R4,B,7.1.00,9.1.00,2.0.00,E41A27
    R5,C,9.1.00,11.1.00,2.0.00,E41A27
    R6,C#,11.1.00,13.1.00,2.0.00,E41A27
    R7,D,13.1.00,15.1.00,2.0.00,E41A27
    R8,D#,15.1.00,17.1.00,2.0.00,E41A27
    R9,E,17.1.00,19.1.00,2.0.00,E41A27
    

    alt text



  • @MusoCity said in Maybe Too Hard A Question ?:

    I want the audio loop player to also follow the host tempo.

    • You mean time stretching? Not available in HISE (at the moment)

    @MusoCity said in Maybe Too Hard A Question ?:

    If I want the audio loop player to loop a particular section of a wav file when I input midi notes 57+61+64 (A chord) and loop another section when I input 58+62+65 (A# chord).

    I have no idea about the loop player(never used it) - but you can set the sample start, loop start, loop end and sample end points in the Sampler..

    • so get the BPM of the DAW,
    • work out (in samples the length you want i.e. 1 Bar)
    • decide your start point in samples
    • set the start end end points of the sample and the loop...


  • I also think that the AudioLoopPlayer is the wrong choice for this.
    Why no sampler?



  • @MikeB

    Why no sampler?

    User can't add their own samples.



  • Sampler ? can you set the chord input, can you give an example.

    This is the tempo sync I mean in Audio Loop Player
    4 SyncMode Syncs the looper to the host tempo



  • @MusoCity The user can't load their own samples into the sampler so I don't think it will be suitable for you.



  • @MusoCity said in Maybe Too Hard A Question ?:

    do you think I'm flogging a dead horse here ?


Log in to reply
 

12
Online

1.3k
Users

4.3k
Topics

38.6k
Posts