Kara-Moon Forum
May 13, 2024, 08:41:13 AM
Welcome,
Guest
. Please
login
or
register
.
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News
: You can go back to the main site here:
Kara-Moon site
Home
Help
Search
Login
Register
Kara-Moon Forum
>
Developers & Technology
>
Musical MIDI Accompaniment (MMA)
(Moderator:
kara
) >
Parse Tree
Pages: [
1
]
« previous
next »
Print
Author
Topic: Parse Tree (Read 5517 times)
sjzabel
Jr. Member
Posts: 9
Parse Tree
«
on:
August 24, 2014, 09:49:56 PM »
This is more of a general how would you approach this...
In iPython I wanted to get to the point of introspecting in on the list and dicts that you have created after the parsing of the syntax but before the midi generation. I was just about to start diving through the code in the mma executable
but figured I would just ask since my son is waking up from his nap and I won't be able to look until later
Cheers,
Stephen
Logged
bvdp
Kara-Moon Master
Posts: 1437
Re: Parse Tree
«
Reply #1 on:
August 24, 2014, 11:49:39 PM »
Okay, this is off the top of my head ... but the idea is that:
1. We have a dict of midi events for each track. This is called miditrk and is part of the gbl.mtrks{} class
2. We use the offset for the name of the keys.
3. Each key in miditrk has a number of lists []. The list is the actual midi data.
The data is put in the track in the order it's encountered.
Is this muddy business clear enough? Have a look at writeout() in midi.py for a good example of how to parse this mess.
Logged
My online life:
http://www.mellowood.ca
sjzabel
Jr. Member
Posts: 9
Re: Parse Tree
«
Reply #2 on:
August 26, 2014, 02:08:03 AM »
Cool, thank you for the pointers
its not often that I get a project maintainer that is as responsive.
I'll let you know as I get a chance to dig in.
Cheers,
Stephen
Logged
bvdp
Kara-Moon Master
Posts: 1437
Re: Parse Tree
«
Reply #3 on:
August 26, 2014, 04:18:58 PM »
Before you dig too much ... share with us what you're trying to accomplish. It might already be there
Logged
My online life:
http://www.mellowood.ca
sjzabel
Jr. Member
Posts: 9
Re: Parse Tree
«
Reply #4 on:
September 08, 2014, 03:12:22 AM »
Cool,
One thing that I'm interested in is how you define a tuning and chords? For instance I'm working with an open G tuning (GBDGDB) and all major cords are just barred straight across.
I also have some pieces that I want to do using an eight strings (but in reality would like to be able to program n strings)
So, is there a syntax for defining chord voicings for different tunings? (I'll go back and double check the documentation again)
Cheers,
Stephen
Logged
bvdp
Kara-Moon Master
Posts: 1437
Re: Parse Tree
«
Reply #5 on:
September 08, 2014, 04:52:39 PM »
Yeah, it's covered in the manual in excruciating detail
But, simply you want a command like:
Plectrum Tuning e- a- d g b e+
The number of notes/pitches in the tuning option also sets the number of strings in the instrument. Duplicates are silently ignored.
Logged
My online life:
http://www.mellowood.ca
Pages: [
1
]
Print
« previous
next »
Jump to:
Please select a destination:
-----------------------------
The Kara-Moon monthly contest
-----------------------------
=> Sex, Drugs and Rock and Roll
===> WInter 2009 - Lost
===> Autumn 2008 - Colors
===> Winter 2008 - Cold
===> Spring 2009 - Time
===> Summer 2009 - Africa
===> Autumn 2010
===> Winter 2011
===> Spring 2011
===> Autumn 2011
===> Winter 2011/2012 - Under the Snow
===> Spring 2012 - Changes
===> Summer 2012 ...look Ma, no click track!
===> Autumn 2012 ...Harvest...
===> Winter 2012/2013 ...Circles...
===> Spring 2013 - Digital Relationship
===> Summer 2013 - Genetic Modification
===> Autumn 2013 - Writing on the Wall
===> Winter 2013 - My First Muse
===> Spring 2014 - Ethnic Flavour
===> Summer 2014 - Holidays
===> - Autumn 2014 - Ultima Thule
===> Winter 2014 - "Toys"
===> Spring 2015: "Old Friends"
===> Summer 2015 - "Metronome"
-----------------------------
Music Auditorium
-----------------------------
=> Pop,Jazz,Rock,Easy Listening
=> Ambient,Trance
=> From the Shadows...
=> Classical
=> General
=> PG musicians
-----------------------------
General & News
-----------------------------
=> News & General Chat
=> Hello/Intro Area
=> Artist Releases
-----------------------------
Kara-Moon Projects
-----------------------------
=> Project - 10
=> Kara Tribute Project
=> Collaboration Songs
=> The KM 2010 live gig
=> Older projects
===> The KM 2009 Live gig
=====> Rehearsal tracks
===> Kara Moon Live Gig 2008
===> Our 2008 CD Project
===> Our first CD release: Best of Kara-Moon 2007 !
-----------------------------
Developers & Technology
-----------------------------
=> Developers at Kara-Moon
=> The open source alternative
=> Musical MIDI Accompaniment (MMA)
=> Studio Tips
=> Hardware
===> DAW
===> Studio Speakers
===> Synthesizers
===> Mics
===> Mixers
===> Miscellanious Studio gear
=> Software
=> Commercial products
-----------------------------
The Sample Section
-----------------------------
=> Equinox Sounds
=> LesProductionsZvon
=> Yinox-Samples
=> Public samples
=> Commercial Samples
-----------------------------
Graphics
-----------------------------
=> Artwork
-----------------------------
Old & closed boards
-----------------------------
=> RESPECT !
-----------------------------
The KM-zine
-----------------------------
=> The actual KM-zine
Loading...