Skip to content

Instantly share code, notes, and snippets.

fredbogg

Block or report user

Report or block fredbogg

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@fredbogg
fredbogg / Main.lua
Created Jun 2, 2012
Piano v2.2 for Codea
View Main.lua
--# Main
-- Piano. This script makes a diatonic keyboard that plays polyphonically.
-- By Fred.
-- v2.2
-- Use this function to perform your initial setup
supportedOrientations(LANDSCAPE_ANY)
function setup()
--displayMode(FULLSCREEN)
@fredbogg
fredbogg / Main.lua
Created May 24, 2012
ABCplayerCodea v0.4.3 Plays music in Codea
View Main.lua
--# ABCMusic
-- ABCMusic class by Fred Bogg
-- v 0.4.3 beta
-- note durations scaled to fit, including attack and decay
-- thanks to Codeslinger and KMEB for sfxr algorithms
-- experimental sound chooser, let it run to cache the sounds
ABCMusic = class()
@fredbogg
fredbogg / ScrollBox.lua
Created Apr 2, 2012
ScrollBox v0.2 for Codea
View ScrollBox.lua
--# Touch
Touch = class()
function Touch:init(x)
self.debug = true
gtTouches = {}
gtTouchList = {}
gnAverageX = 0
gnAverageY = 0
gnAverageXDelta = 0
@fredbogg
fredbogg / ABCplayerCodea v0.4
Created Mar 4, 2012
Play ABC notation tunes in your Codea project.
View ABCplayerCodea v0.4
--# ABCMusic
--ABCMusic class by Fred Bogg
-- v 0.4 beta
-- tuplets work
ABCMusic = class()
function ABCMusic:init(_ABCTune,LOOP,DEBUG,DUMP)
@fredbogg
fredbogg / ABCMusicData.lua
Created Jan 27, 2012
ABCplayerCodea v0.2.1
View ABCMusicData.lua
function sampleMusic()
    -- An ABC tune is a string with newline characters to denote new lines.
    -- See the many web pages on ABC musical notation to get a tune or an understanding of
    -- this allegedly human- and machine-readable format.  
    -- You could even write your own by hand or use another program to convert a MIDI file.
   
     ABCtune =
     'X:1\n'
    ..'T:Bogg Blues\n'
    ..'C:Fred Bogg\n'
@fredbogg
fredbogg / Main.lua
Created Jan 27, 2012
ABCplayerCodea v0.2.1
View Main.lua
-- ABCplayerCodea version 0.2.0
-- Plays ABC musical notation format tunes on the Codea/Codify iPad platform. 
-- By Fred Bogg, November 2011.  Improvements welcome. Thanks to ipda41001 for coding assistance.
-- This program defines musical notes and chords, parses an ABC format tune, creates a table
-- of notes to be played with their durations, and then plays it.  With the parsing done 
-- first, playback is possible without slowing down draw frames (psuedo-background).
-- 0.2.0
-- Uses new sound() API based on sfxr
-- Tunes can play independently
@fredbogg
fredbogg / ABCMusic.lua
Created Jan 27, 2012
ABCplayerCodea v0.2.2
View ABCMusic.lua
ABCMusic = class()
      
function ABCMusic:init(_ABCTune,LOOP,DEBUG,DUMP)
    self.DEBUG = DEBUG
    if self.DEBUG == nil then self.DEBUG = false end
    if DUMP == nil then DUMP = false end
    if _ABCTune == nil then
        print("No tune provided. Use ABCMusic(tunename)")
    end    
    self.LOOP = LOOP
@fredbogg
fredbogg / Main.lua
Created Jan 4, 2012
ABCplayerCodea 0.1.9
View Main.lua
-- ABCplayerCodea version 0.1.9
-- Plays ABC musical notation format tunes on the Codea/Codify iPad platform. 
-- By Fred Bogg, November 2011.  Improvements welcome. Thanks to ipda41001 for coding assistance.
-- This program defines musical notes and chords, parses an ABC format tune, creates a table
-- of notes to be played with their durations, and then plays it.  With the parsing done 
-- first, playback is possible without slowing down draw frames (psuedo-background).
-- 0.1.9
-- bug fixes and stuff
@fredbogg
fredbogg / ABCMusicData.lua
Created Jan 4, 2012
ABCplayerCodea v0.1.9
View ABCMusicData.lua
function sampleMusic()
    -- An ABC tune is a string with newline characters to denote new lines.
    -- See the many web pages on ABC musical notation to get a tune or an understanding of
    -- this allegedly human- and machine-readable format.  
    -- You could even write your own by hand or use another program to convert a MIDI file.
   
     ABCtune =
     'X:1\n'
    ..'T:Bogg Blues\n'
    ..'C:Fred Bogg\n'
@fredbogg
fredbogg / ABCMusic.lua
Created Jan 4, 2012
ABCplayerCodea v0.1.9
View ABCMusic.lua
ABCMusic = class()
      
function ABCMusic:init(_ABCTune,LOOP,DEBUG,DUMP)
    self.DEBUG = DEBUG
    if self.DEBUG == nil then self.DEBUG = false end
    if DUMP == nil then DUMP = false end
    if _ABCTune == nil then
        print("No tune provided. Use ABCMusic(tunename)")
    end    
    self.LOOP = LOOP
You can’t perform that action at this time.