SlideShare a Scribd company logo
1 of 27
Music Interface Design
Introduction to
SuperCollider & OSC
Amir Rahimzadeh
codemusicians@gmail.com
Music Interface Design - Amir Rahimzadeh
codemusicians@gmail.com
Music Interface Design – What my brain looks like.
Music Interface Design - Amir Rahimzadeh
codemusicians@gmail.com
Music Interface Design – What is SuperCollider?
• Free
• Real-time
• Cross-Platform
• Programming Language
• Audio Synthesis & Algorithmic Composition
http://supercollider.github.io/
Music Interface Design - Amir Rahimzadeh
codemusicians@gmail.com
Music Interface Design – SuperCollider Basics
2 basic components
Server <-OSC-> Client
“scsynth” <-OSC-> “sclang”
OSC … Open Sound Control
Music Interface Design - Amir Rahimzadeh
codemusicians@gmail.com
Music Interface Design – Download & Install
• Download: http://supercollider.github.io/
• Download all Tutorials: http://tinyurl.com/qhv49aw
• Install
• Open SuperCollider
Music Interface Design - Amir Rahimzadeh
codemusicians@gmail.com
Music Interface Design – Warning
To protect your ears and loudspeakers always set your system
to the lowest level before starting a sound !!!
Music Interface Design - Amir Rahimzadeh
codemusicians@gmail.com
Music Interface Design – Making sound
1) Boot the server: s.boot;
2) Make a sound: ({SinOsc.ar(440)}).play;
3) Execute a command: mark all code, “shift+enter”
4) Stop Playback: “cmd + .”
Music Interface Design - Amir Rahimzadeh
codemusicians@gmail.com
Music Interface Design – Manipulating sound via Mouse
MouseX.kr(220,440)
Maps horizontal mouse cursor position
to the values between 220 and 440.
Music Interface Design - Amir Rahimzadeh
codemusicians@gmail.com
Music Interface Design – Review
What have you learned so far?
• Functions/Ugens take arguments
• Function arguments can be constant or other functions/Ugens
(e.g. MouseX.kr())
• The difference between audio rate and control rate
• How to find the arguments of a function using the help
browser
• How to use function MouseX as control value
Music Interface Design - Amir Rahimzadeh
codemusicians@gmail.com
Music Interface Design – Assignment 1
Assignment 1: Difficulty: Easy
• Add to the preceding example a control over the amplitude of
the sinusoid using the vertical mouse position on your screen.
The amplitude shoud vary between 0 and 1.
Hint: To change the amplitude the sinusoid has to be multiplied. There are 2 ways
to achieve that. Make use of the help browser to determine which argument has
to be changed. Argument “phase“ can be set to 0.
Music Interface Design - Amir Rahimzadeh
codemusicians@gmail.com
Music Interface Design – Assignment 2
Assignment 2: Difficulty: Medium
• Replace the manual control over the amplitude (MouseY.kr)
from the previous example by a sine oscillator with a
frequency of 1 Hz that continuously varies the amplitude.
• Would you use SinOsc.ar or SinOsc.kr for the amplitude
control? Why?
Hint: There are 2 ways to achieve that.
Music Interface Design - Amir Rahimzadeh
codemusicians@gmail.com
Music Interface Design – Assignment 3
Assignment 3: Difficulty: Advanced
• Replace the constant frequency of 1Hz of the SinOsc that
controls the amplitude in the previous assignment by MouseY.
The frequency of amplitude change should vary between 1
and 10Hz according to the position of the mouse cursor in
vertical direction.
Hint: There are 2 ways to achieve that.
Music Interface Design - Amir Rahimzadeh
codemusicians@gmail.com
Music Interface Design – Setting up control from iPhone (1)
• iPhone/iPad: Download & Install GyrOSC
• Other smartphones: Download & Install qOSC
Music Interface Design - Amir Rahimzadeh
codemusicians@gmail.com
Music Interface Design – Setting up control from iPhone (2)
Get the IP address of your pc/mac
Mac: “Terminal” -> “ifconfig”
Search for: “inet 192.168.2.102” (actual numbers will vary)
Windows 2000 / XP / Vista:
“Start Menu” -> “Run” -> “cmd /k ipconfig /all”
Search for: “IPv4 Address”
Music Interface Design - Amir Rahimzadeh
codemusicians@gmail.com
Music Interface Design – Setting up control from iPhone (3)
Configure GyrOSC qOSC
Ziel IP Adresse:
set it to match the
IP address of your Mac/PC.
Port: set it to 57120
the standard port
SuperCollider listens
to incoming messages.
Music Interface Design - Amir Rahimzadeh
codemusicians@gmail.com
Music Interface Design – Setting up control from iPhone (4)
Receiving GyrOSC control values in SuperCollider
• Set up an OSC Responder in SuperCollider
• Output the received control values (from pressing buttons in
GyrOSC) to SC’s “Post Window”
s.boot;
OSCresponder(nil, "/gyrosc/button",
{
arg t, r, msg;
msg.postln;
}
).add;
Music Interface Design - Amir Rahimzadeh
codemusicians@gmail.com
Music Interface Design – Setting up control from qOSC (5)
Receiving qOSC control values in SuperCollider
• Set up an OSC Responder in SuperCollider
• Output the received control values (from pressing buttons in qOSC)
to SC’s “Post Window”
s.boot;
OSCresponder(nil, "/btn14/0",
{
arg t, r, msg;
msg.postln;
}
).add;
Music Interface Design - Amir Rahimzadeh
codemusicians@gmail.com
Music Interface Design – Synth Definitions
• Until now Ugens to create sound
{ SinOsc.ar(440) }.play;
• For more flexibility and control -> SynthDef
Synth Definitions tell the server how various Ugens are interconnected.
SynthDef(SineSynth, // Define the synth
{
arg freq=440;
var sig;
sig = SinOsc.ar(freq);
Out.ar(0, sig);
}).send(s);
x = Synth.new(SineSynth); // Create an instance of the synth
x.set(freq, 220); // Change the frequency of the running synth to 220 Hz
Music Interface Design - Amir Rahimzadeh
codemusicians@gmail.com
Music Interface Design – Change the frequency from iPhone
Change frequency on button press
OSCresponder(nil, "/gyrosc/button",
{
arg t, r, msg;
msg.postln;
x.set(freq, 110*msg[1]); // msg[1]…button number
}
).add;
Music Interface Design - Amir Rahimzadeh
codemusicians@gmail.com
Music Interface Design – Play MIDI scale from iPhone
Mapping button numbers to MIDI notes
• Changing: x.set(freq, 110*msg[1]);
• to: x.set(freq, midicps(69+msg[1]));
“midicps” … maps MIDI notes to frequency in Hz.
Music Interface Design - Amir Rahimzadeh
codemusicians@gmail.com
Music Interface Design – Envelopes ADSR & Perc
EnvGen.ar(Env.adsr(0,0.1,1,0.3)) *sig;
EnvGen.ar(Env.perc) * sig;
Music Interface Design - Amir Rahimzadeh
codemusicians@gmail.com
Music Interface Design – Playing Chords
Create Amin7 chord on button1 press
Corresponding MIDI notes are: 69, 72, 76, 79
Synth.new(SinSynth, [freq1, midicps(69)]);
Synth.new(SinSynth, [freq1, midicps(72)]);
Synth.new(SinSynth, [freq1, midicps(76)]);
Synth.new(SinSynth, [freq1, midicps(79)]);
Music Interface Design - Amir Rahimzadeh
codemusicians@gmail.com
Music Interface Design – Trigger Samples from iPhone (1)
• Samples have to be *.wav files.
• Set the path to the sample directory:
~path = "~/Desktop/Super Collider Tutorials/Samples/".standardizePath;
• Load sample into a variable
a = Buffer.read(s,~path ++ "BD.wav" );
Music Interface Design - Amir Rahimzadeh
codemusicians@gmail.com
Music Interface Design – Trigger Samples from iPhone (2)
• Define a synth for sample playback
SynthDef(Samples,
{
arg buf = 0;
var sig;
sig = PlayBuf.ar(1, buf, BufRateScale.kr(buf));
sig = sig*EnvGen.ar(Env.adsr(0,0.1,1,0.3), doneAction: 2);
Out.ar([0,1], sig);
}).add;
Music Interface Design - Amir Rahimzadeh
codemusicians@gmail.com
Music Interface Design – Trigger Samples from iPhone (3)
• Playback Sample
Synth.new(Samples, [buf, a]);
• Put that command into an OSCResponder
Music Interface Design - Amir Rahimzadeh
codemusicians@gmail.com
Music Interface Design Course
Music Interface Design Course
8 week Course – Start: September 2015
Dates:
05.09. / 12.09. / 03.10. / 10.10
17.10. / 24.10. / 31.10. / 07.11.
Music Interface Design - Amir Rahimzadeh
codemusicians@gmail.com
Music Interface Design Course
Details
• 1 interface per workshop including:
– automatic melody generation
– automatic chord generation
– touchless interaction using magnets
– real-time voice processing
– air drums
– air guitar
– Understand physics of the sensors used
• last 2 workshops:
develop your instruments
What‘s possible?
http://tinyurl.com/opwlsbk
http://tinyurl.com/iTraktor
Register NOW at
codemusicians@gmail.com
Course Fee: 320 € / 8 weeks
Music Interface Design - Amir Rahimzadeh
codemusicians@gmail.com

More Related Content

Recently uploaded

The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxheathfieldcps1
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...EduSkills OECD
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdfQucHHunhnh
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104misteraugie
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Celine George
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfJayanti Pande
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxAreebaZafar22
 
Gardella_Mateo_IntellectualProperty.pdf.
Gardella_Mateo_IntellectualProperty.pdf.Gardella_Mateo_IntellectualProperty.pdf.
Gardella_Mateo_IntellectualProperty.pdf.MateoGardella
 
SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...
SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...
SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...KokoStevan
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactdawncurless
 
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...Shubhangi Sonawane
 
Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxnegromaestrong
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxDenish Jangid
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactPECB
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeThiyagu K
 

Recently uploaded (20)

The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17
 
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptxINDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdf
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptx
 
Gardella_Mateo_IntellectualProperty.pdf.
Gardella_Mateo_IntellectualProperty.pdf.Gardella_Mateo_IntellectualProperty.pdf.
Gardella_Mateo_IntellectualProperty.pdf.
 
SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...
SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...
SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
 
Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptx
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 
Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024
 

Featured

PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024Neil Kimberley
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)contently
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsKurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summarySpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentLily Ray
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best PracticesVit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project managementMindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...RachelPearson36
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Applitools
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at WorkGetSmarter
 
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...DevGAMM Conference
 
Barbie - Brand Strategy Presentation
Barbie - Brand Strategy PresentationBarbie - Brand Strategy Presentation
Barbie - Brand Strategy PresentationErica Santiago
 

Featured (20)

PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work
 
ChatGPT webinar slides
ChatGPT webinar slidesChatGPT webinar slides
ChatGPT webinar slides
 
More than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike RoutesMore than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike Routes
 
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
 
Barbie - Brand Strategy Presentation
Barbie - Brand Strategy PresentationBarbie - Brand Strategy Presentation
Barbie - Brand Strategy Presentation
 

Music Interface Design with SuperCollider and smartphones

  • 1. Music Interface Design Introduction to SuperCollider & OSC Amir Rahimzadeh codemusicians@gmail.com Music Interface Design - Amir Rahimzadeh codemusicians@gmail.com
  • 2. Music Interface Design – What my brain looks like. Music Interface Design - Amir Rahimzadeh codemusicians@gmail.com
  • 3. Music Interface Design – What is SuperCollider? • Free • Real-time • Cross-Platform • Programming Language • Audio Synthesis & Algorithmic Composition http://supercollider.github.io/ Music Interface Design - Amir Rahimzadeh codemusicians@gmail.com
  • 4. Music Interface Design – SuperCollider Basics 2 basic components Server <-OSC-> Client “scsynth” <-OSC-> “sclang” OSC … Open Sound Control Music Interface Design - Amir Rahimzadeh codemusicians@gmail.com
  • 5. Music Interface Design – Download & Install • Download: http://supercollider.github.io/ • Download all Tutorials: http://tinyurl.com/qhv49aw • Install • Open SuperCollider Music Interface Design - Amir Rahimzadeh codemusicians@gmail.com
  • 6. Music Interface Design – Warning To protect your ears and loudspeakers always set your system to the lowest level before starting a sound !!! Music Interface Design - Amir Rahimzadeh codemusicians@gmail.com
  • 7. Music Interface Design – Making sound 1) Boot the server: s.boot; 2) Make a sound: ({SinOsc.ar(440)}).play; 3) Execute a command: mark all code, “shift+enter” 4) Stop Playback: “cmd + .” Music Interface Design - Amir Rahimzadeh codemusicians@gmail.com
  • 8. Music Interface Design – Manipulating sound via Mouse MouseX.kr(220,440) Maps horizontal mouse cursor position to the values between 220 and 440. Music Interface Design - Amir Rahimzadeh codemusicians@gmail.com
  • 9. Music Interface Design – Review What have you learned so far? • Functions/Ugens take arguments • Function arguments can be constant or other functions/Ugens (e.g. MouseX.kr()) • The difference between audio rate and control rate • How to find the arguments of a function using the help browser • How to use function MouseX as control value Music Interface Design - Amir Rahimzadeh codemusicians@gmail.com
  • 10. Music Interface Design – Assignment 1 Assignment 1: Difficulty: Easy • Add to the preceding example a control over the amplitude of the sinusoid using the vertical mouse position on your screen. The amplitude shoud vary between 0 and 1. Hint: To change the amplitude the sinusoid has to be multiplied. There are 2 ways to achieve that. Make use of the help browser to determine which argument has to be changed. Argument “phase“ can be set to 0. Music Interface Design - Amir Rahimzadeh codemusicians@gmail.com
  • 11. Music Interface Design – Assignment 2 Assignment 2: Difficulty: Medium • Replace the manual control over the amplitude (MouseY.kr) from the previous example by a sine oscillator with a frequency of 1 Hz that continuously varies the amplitude. • Would you use SinOsc.ar or SinOsc.kr for the amplitude control? Why? Hint: There are 2 ways to achieve that. Music Interface Design - Amir Rahimzadeh codemusicians@gmail.com
  • 12. Music Interface Design – Assignment 3 Assignment 3: Difficulty: Advanced • Replace the constant frequency of 1Hz of the SinOsc that controls the amplitude in the previous assignment by MouseY. The frequency of amplitude change should vary between 1 and 10Hz according to the position of the mouse cursor in vertical direction. Hint: There are 2 ways to achieve that. Music Interface Design - Amir Rahimzadeh codemusicians@gmail.com
  • 13. Music Interface Design – Setting up control from iPhone (1) • iPhone/iPad: Download & Install GyrOSC • Other smartphones: Download & Install qOSC Music Interface Design - Amir Rahimzadeh codemusicians@gmail.com
  • 14. Music Interface Design – Setting up control from iPhone (2) Get the IP address of your pc/mac Mac: “Terminal” -> “ifconfig” Search for: “inet 192.168.2.102” (actual numbers will vary) Windows 2000 / XP / Vista: “Start Menu” -> “Run” -> “cmd /k ipconfig /all” Search for: “IPv4 Address” Music Interface Design - Amir Rahimzadeh codemusicians@gmail.com
  • 15. Music Interface Design – Setting up control from iPhone (3) Configure GyrOSC qOSC Ziel IP Adresse: set it to match the IP address of your Mac/PC. Port: set it to 57120 the standard port SuperCollider listens to incoming messages. Music Interface Design - Amir Rahimzadeh codemusicians@gmail.com
  • 16. Music Interface Design – Setting up control from iPhone (4) Receiving GyrOSC control values in SuperCollider • Set up an OSC Responder in SuperCollider • Output the received control values (from pressing buttons in GyrOSC) to SC’s “Post Window” s.boot; OSCresponder(nil, "/gyrosc/button", { arg t, r, msg; msg.postln; } ).add; Music Interface Design - Amir Rahimzadeh codemusicians@gmail.com
  • 17. Music Interface Design – Setting up control from qOSC (5) Receiving qOSC control values in SuperCollider • Set up an OSC Responder in SuperCollider • Output the received control values (from pressing buttons in qOSC) to SC’s “Post Window” s.boot; OSCresponder(nil, "/btn14/0", { arg t, r, msg; msg.postln; } ).add; Music Interface Design - Amir Rahimzadeh codemusicians@gmail.com
  • 18. Music Interface Design – Synth Definitions • Until now Ugens to create sound { SinOsc.ar(440) }.play; • For more flexibility and control -> SynthDef Synth Definitions tell the server how various Ugens are interconnected. SynthDef(SineSynth, // Define the synth { arg freq=440; var sig; sig = SinOsc.ar(freq); Out.ar(0, sig); }).send(s); x = Synth.new(SineSynth); // Create an instance of the synth x.set(freq, 220); // Change the frequency of the running synth to 220 Hz Music Interface Design - Amir Rahimzadeh codemusicians@gmail.com
  • 19. Music Interface Design – Change the frequency from iPhone Change frequency on button press OSCresponder(nil, "/gyrosc/button", { arg t, r, msg; msg.postln; x.set(freq, 110*msg[1]); // msg[1]…button number } ).add; Music Interface Design - Amir Rahimzadeh codemusicians@gmail.com
  • 20. Music Interface Design – Play MIDI scale from iPhone Mapping button numbers to MIDI notes • Changing: x.set(freq, 110*msg[1]); • to: x.set(freq, midicps(69+msg[1])); “midicps” … maps MIDI notes to frequency in Hz. Music Interface Design - Amir Rahimzadeh codemusicians@gmail.com
  • 21. Music Interface Design – Envelopes ADSR & Perc EnvGen.ar(Env.adsr(0,0.1,1,0.3)) *sig; EnvGen.ar(Env.perc) * sig; Music Interface Design - Amir Rahimzadeh codemusicians@gmail.com
  • 22. Music Interface Design – Playing Chords Create Amin7 chord on button1 press Corresponding MIDI notes are: 69, 72, 76, 79 Synth.new(SinSynth, [freq1, midicps(69)]); Synth.new(SinSynth, [freq1, midicps(72)]); Synth.new(SinSynth, [freq1, midicps(76)]); Synth.new(SinSynth, [freq1, midicps(79)]); Music Interface Design - Amir Rahimzadeh codemusicians@gmail.com
  • 23. Music Interface Design – Trigger Samples from iPhone (1) • Samples have to be *.wav files. • Set the path to the sample directory: ~path = "~/Desktop/Super Collider Tutorials/Samples/".standardizePath; • Load sample into a variable a = Buffer.read(s,~path ++ "BD.wav" ); Music Interface Design - Amir Rahimzadeh codemusicians@gmail.com
  • 24. Music Interface Design – Trigger Samples from iPhone (2) • Define a synth for sample playback SynthDef(Samples, { arg buf = 0; var sig; sig = PlayBuf.ar(1, buf, BufRateScale.kr(buf)); sig = sig*EnvGen.ar(Env.adsr(0,0.1,1,0.3), doneAction: 2); Out.ar([0,1], sig); }).add; Music Interface Design - Amir Rahimzadeh codemusicians@gmail.com
  • 25. Music Interface Design – Trigger Samples from iPhone (3) • Playback Sample Synth.new(Samples, [buf, a]); • Put that command into an OSCResponder Music Interface Design - Amir Rahimzadeh codemusicians@gmail.com
  • 26. Music Interface Design Course Music Interface Design Course 8 week Course – Start: September 2015 Dates: 05.09. / 12.09. / 03.10. / 10.10 17.10. / 24.10. / 31.10. / 07.11. Music Interface Design - Amir Rahimzadeh codemusicians@gmail.com
  • 27. Music Interface Design Course Details • 1 interface per workshop including: – automatic melody generation – automatic chord generation – touchless interaction using magnets – real-time voice processing – air drums – air guitar – Understand physics of the sensors used • last 2 workshops: develop your instruments What‘s possible? http://tinyurl.com/opwlsbk http://tinyurl.com/iTraktor Register NOW at codemusicians@gmail.com Course Fee: 320 € / 8 weeks Music Interface Design - Amir Rahimzadeh codemusicians@gmail.com