Doküman >> MATLAB'de Müzik Yapmak mı? (20371 Read)

Full Text:PrintShare

Önceki makelemde "3 Oktavlı Müzik Çalar Projesi" kodlarımı ekleyeceğimi söylemiştim. Kodları buradan indirebilirsiniz, ancak indirme işlemine başlamak için şifreye ihtiyacınız var.

Kodu GNU lisansı altında sunuyorum. Bu nedenle GNU lisansı şartlarına uymalı ve projenize dahil etmek isterseniz adımı yazmalısınız. 

Şifreyi almak için aşağı yorum yazabilir veya benimle iletişime geçebilirsiniz. Aşağıda Müzik Çalar'ın temel kullanımı anlatılmakta. Yardım dosyası da İngilizce olduğu için hızlı başlangıç kılavuzu da İngilizce. Eğer anlaşılmayan bir bölüm varsa, sorabilirsiniz.

İndirdiğiniz dosyada çok sayıda örnek de bulabileceksiniz.

Daha önceden "Someone Like You" parçasını hazırlamıştım. Bununla birlikte bir de "Antep'in Hamamları" parçasını aşağıdan izleyebilirsiniz:

 

 

***3 Octave Note Player for MATLAB***


Copyright (c) 2012-2013 - Volkan Gezer

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.

v1.0 by Volkan Gezer
http://volkangezer.scienceontheweb.net

*Quick Start Guide:

a) Files required:

musicplay.m - Main function file
returnNotes.m - Note letter to note number equivalent conversion function

b) Usage

0) Change MATLAB active directory to this directory.

1) Enter left and right hand notes in a char array using space between notes.

*Notes should be entered as follows: NoteLetter[Sharp(#)symbol]OctaveNumber.

Example: C#4 D5

* Since notes will be inside a char array, they should follow the rule below:
x=['NoteLetter1[Sharp(#)symbol]OctaveNumber1 NoteLetter2[Sharp(#)symbol]OctaveNumber2'];

*** Square brackets are optional, but single quotes are obligatory!

Example: i=['C#4 D5'];

* For neat coding, you may want to go to next line. To go to next line, close single quote
('), add three dots (...), go to next line, start line using single quote again and leave
a space before entering new note.

Example:

j=['C4 D3 G5 D4 D4 E4 A4' ...
' C4 C4 G5 F#4 E4 A4'
];

2) Call function to play the notes.

After writing notes for both left and right hand (see below (3) if you have no notes for left hand)
call function using: musicplay(rightHandNotes, leftHandNotes, defaultOctave, startFromLeft, 
playFromLeft, waittime, sampleCount, samplingFreq)

At least two arguments (rightHandNotes, leftHandNotes) should be given so that others will get 
their default values.

3) If you have no notes for leftHandNotes:

* You should create a silent note using x=['N0'] and playFromLeft argument should be zero.

*** This will bypass playing from left hand notes.


4) More questions on usage or looking for examples?

Execute: run('./twinkletwinklelittlestar_regular.m') - for Twinkle Twinkle Little Star
Execute: run('./someonelikeyou_regular.m') - for Adele - Someone Like You
Execute: run('./someonelikeyou_numbereq.m') - for Adele - Someone Like You (number equivalence of notes)
Execute: run('./titanium_regular.m') - for David Guetta - Titanium


Execute "doc musicplay" on MATLAB

c) Troubleshooting:

Here are some problems that you may experience and their solutions:

1) Subscript indices must either be real positive integers or logicals. - The first note at first line 
starting after single quote must not have a space in front of it.
2) CAT arguments dimensions are not consistent. - You used multiple lines, but forgot to place "..." at 
the end of the lines.
3) In an assignment A(I) = B, the number of elements in B and ... - There are no spaces between notes 
or octave number is missing (e.g. you only wrote C instead of C4).
4) Index exceeds matrix dimensions. - You have more than one space between notes.

Language:

Türkçe (TR)

Date added:

12.02.2013 18:25:08

Added by:

Volkan Gezer

Tags:

matlab müzik çalar, matlab'de müzik çalmak, matlab eğlence, matlab fun, matlab'de nota çalmak, matlab müzik oluşturmak


Write a Comment

First Name Last Name:
E-Mail (will not be shown):
Title:
Comment:
Security Code: 984900


Comments to this article


Comment: #1^
Title: matlabta müzik
Comment:

Hocam paylaşımınız çok güzel, matlabda müzik yapmak paylaşımının kodları için şifre gönderirseniz incelemek istiyorum . Teşekkürler

Yanıt:

Şifrenizi e-posta adresinize gönderdim. Teşekkürler...

Added by: Aytaç Altıntaş (Added by: 17.12.2014 09:29:00)
Comment: #2^
Title: Matlabda müzik
Comment:

Hocam merhaba, ben matematik bölümü yüksek lisans öğrencisiyim. Tezimde notaların şifrelenmesini inceliyorum ama bu kodların matlabda müziğe dönüştürülüp, notayı yazan kişi açısından anlamlı hale getirilmesi gerekiyor. Makalenizden anladığım kadarıyla kodlarınız bana çok faydalı olacak. İncelemem için bana şifre gönderebilir misiniz? Teşekkürler. İyi çalışmalar.

Cevap:

Merhaba,

Sifre e-posta ile gonderildi. Basarilar...

Added by: Deniz ELMACI (Added by: 14.10.2015 10:11:59)
Comment: #3^
Title: notalarınızı incelemek istiyorum
Comment:

kodlarınızı ıncelemek istiyorum şifreyi gönderirseniz sevinirim

Yanıt:

Şifre e-posta ile gönderildi.

Added by: Esragül (Added by: 06.12.2016 17:31:40)


Top of the page