Code Monkey home page Code Monkey logo

cartographer's People

Contributors

andr-ew avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar

cartographer's Issues

voice assignment / automatic updating

came up with friendly solution:

warden.assign([voices, ], slice)

each slice would have a table of voice indices it is assigned to. calling the function above would detach indices from their last slice and insert them into the new slice. all setter functions would then just send update_voice their voice table every call. update_voice can even stick around as a lower level utility for voice assignment (which I still think I prefer).

set slice to two voices on sequential buffers

potential solutions:

  • add a 'stereo' flag to update_voice to increment buffer when setting the second voice
  • add a buffer argument to update_voice which just overwrites whatever is stored
  • a 'stereo' flag in warden.subloop & warden.divide specifying that the new regions are stereo regions (buffer = { 1, 2 } or buffer = 3, 'both'/'stereo' ?)
  • some separate warden function to set a table as stereo buffers
  • just manually set buffer = 3 on all slices

save / load

blank_area = warden.divide(warden.buffer[1], 2)
rec_area = warden.subloop(blank_area)
play_area = warden.subloop(rec_area)

function init()
    warden.load(blank_area, play_area)
end

function cleanup()
    warden.save(blank_area, play_area)
end

last two arguments (non-table) may be save slot & file name

sample folder load

great for drums !

drums = cartographer.folder(cartographer.buffer, '~/dust/audio/common/808')

cartographer.assign(drums['808-BD'], 1)
cartographer.assign(drums['808-CP'], 2)

drums:trigger(1)
drums['808-CP']:trigger()

warden.get/set

abstract lower level bits of save/load, can be used externally for preset storage

softcut shortcut wrappers

a few shortcuts that take advantage of the region & buffer data in warden

  • Slice:clear(): softcut.buffer_clear_region_
  • Slice:copy(source_slice, fade_time, reverse): buffer_copy_
  • Slice:read(file): buffer_read_
  • Slice:write(file): buffer_write_
  • Slice:render(samples): render_buffer
  • Slice:phase_relative(phase, [units]) : scale phase from phase_event

add `bundle:set_boundary` & `bundle:get_boundary`

adjusts both the end point of one slice and the start point of the following slice, so they're sill touching. times are relative to slice containing both slices that are being adjusted. boundaries are 0-based, starting from the very beginning, which I think makes sense since you usually don't need to adjust the 0th boundary.

bundle:set_boundary(boundary, t, <'seconds' or 'fraction'>, <'relative' or 'absolute'>)
bundle:get_boundary(boundary, <'seconds' or 'fraction'>, <'relative' or 'absolute'>)

also:

bundle:index_to_boundary(index, <'left' or 'right'>)
bundle:boundary_to_index(boundary, <'left' or 'right'>)

slice-level pedal looping

mmm ok since dan suggested it maybe it does make sense - we don't want to extend the scope to control record flags, but we can abstract away only the parts of the function that set the record region size

lets see how it would look at a basic script level, using some readable conventions:

recording = false
has_initial_recording = false

function key(n, z)
    if z == 1 and n == 2 then
        if not has_initial_recording then
            if not recording then
                softcut.rec(1)
                reg.rec:punch_in()
            elseif recording then
                softcut.rec(0)
                reg.rec:punch_out()
            end
        elseif has_initial_recording then
            if not recording then 
                softcut.rec(1)
                recording = true
            else 
                softcut.rec(0)
                recording = false 
            end
        end
    end
end

load/save buffer audio helper

options:

  • built into current warden.load/save with a data-only flag
  • separate functions in warden (audio_save/data_save)
  • keep this part in the splice, saving many small audio files rather than one large one for the full buffer (a macro could be build into warden)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.