micah-frank-studio/Grainstation-C

Loop / Record lenght

Closed this issue · 1 comments

Hi,
first of all I want to say thank you for the Grainstation-C device!
In the last months I was really stressed out about making music and I after trying your device I'm feeling simply happy to play with it!
I have two dummy questions 'cause I never used Csound before and I can't find the solution on line :
Can I set the lenght of the loops imported and the lenght of the recorded tracks?

Thank you so much!

You could adjust this starting with
a1L syncloop klev[0], kdens1, gkpitch[0], kgrsize1, ips*kstr1, 0, ftlen(giL[0])/sr, giL[0], 1, iolaps

where a1L means soundfile 1 Left. The 6th argument (0) is the start time in seconds. The next argument ftlen(giL[0])/sr is the sample end time in seconds. As it is, it just calculates the length of the file so it loops from beginning to end. So if you wanted it to start at 2 seconds and end at 4.3 seconds your code would look like this:

a1L syncloop klev[0], kdens1, gkpitch[0], kgrsize1, ips*kstr1, 2, 4.3, giL[0], 1, iolaps

You could assign a controller to the end point too.