That wouldn't be any problem, as the samples that DO use already custom loop points should be ready to use
in that way anyway. It's for everything else and a lot (!) of sample libraries do not have any loop points embedded.
That wouldn't be any problem, as the samples that DO use already custom loop points should be ready to use
kjetil wrote: ↑12 Nov 2020 12:47 Note that the ra:set-instrument-loop-data function might cause crash in peak rendering code, I think it was, for extreme or illegal values, so you should be a little careful. And no need to send crash reports. I'll fix this though. The function was made for the tracker module importer only, i.e. it is more of an internal function, so it hasn't been tested for illegal and extreme values.
kjetil wrote: ↑11 Nov 2020 14:57 That's what the function "ra.setInstrumentLoopData" does by the way. Here's a quick GUI for it:Code: Select all
(let () (define has-started #f) (define start 0) (define end 1) (define (set2) (if has-started (<ra> :set-instrument-loop-data (<ra> :get-current-instrument) start (- end start)))) (define slider1 (<gui> :horizontal-int-slider "Start:" 0 0 48000 (lambda (asdf) (set! start asdf) (set2)))) (define slider2 (<gui> :horizontal-int-slider "End" -5 10 48000 (lambda (asdf) (set! end asdf) (set2)))) (define group (<gui> :group "stuff" (<gui> :vertical-layout slider1 slider2))) (<gui> :show group) (<gui> :set-parent group -1) (set! has-started #t))
Code: Select all
2020-11-12 15:20:49:
error: unbound-variable unbound variable open-loop-editor in (open-loop-editor)
error-code: (open-loop-editor)
error-file/line: #f[673]
error-history:
"(open-loop-editor)"
1:
"(apply func args)"
;init.scm[318]
3:
"(FROM-C-catch-all-errors-and-display-backtrace-automatically eval-string "(open-loop-editor)")"
(args "(open-loop-editor)") (func . eval-string)
not this one? --->
Code: Select all
(define (open-loop-editor)
(define has-started #f)
(define start 0)
(define end 1)
(define (set2)
(if has-started
(<ra> :set-instrument-loop-data (<ra> :get-current-instrument) start (- end start))))
(define slider1 (<gui> :horizontal-int-slider "Start:" 0 0 48000 (lambda (asdf)
(set! start asdf)
(set2))))
(define slider2 (<gui> :horizontal-int-slider "End" -5 10 48000 (lambda (asdf)
(set! end asdf)
(set2))))
(define group (<gui> :group "stuff"
(<gui> :vertical-layout
slider1
slider2)))
(<gui> :show group)
(<gui> :set-parent group -1)
(set! has-started #t))
Yes, that's the correct one.Lytz1 wrote: ↑12 Nov 2020 16:12not this one? --->Code: Select all
(define (open-loop-editor) (define has-started #f) (define start 0) (define end 1) (define (set2) (if has-started (<ra> :set-instrument-loop-data (<ra> :get-current-instrument) start (- end start)))) (define slider1 (<gui> :horizontal-int-slider "Start:" 0 0 48000 (lambda (asdf) (set! start asdf) (set2)))) (define slider2 (<gui> :horizontal-int-slider "End" -5 10 48000 (lambda (asdf) (set! end asdf) (set2)))) (define group (<gui> :group "stuff" (<gui> :vertical-layout slider1 slider2))) (<gui> :show group) (<gui> :set-parent group -1) (set! has-started #t))
Well, ok, this was copied back to here straight out of my myscheme.scm file.kjetil wrote: ↑12 Nov 2020 16:16Yes, that's the correct one.Lytz1 wrote: ↑12 Nov 2020 16:12not this one? --->Code: Select all
(define (open-loop-editor) (define has-started #f) (define start 0) (define end 1) (define (set2) (if has-started (<ra> :set-instrument-loop-data (<ra> :get-current-instrument) start (- end start)))) (define slider1 (<gui> :horizontal-int-slider "Start:" 0 0 48000 (lambda (asdf) (set! start asdf) (set2)))) (define slider2 (<gui> :horizontal-int-slider "End" -5 10 48000 (lambda (asdf) (set! end asdf) (set2)))) (define group (<gui> :group "stuff" (<gui> :vertical-layout slider1 slider2))) (<gui> :show group) (<gui> :set-parent group -1) (set! has-started #t))