3.4 Sampling

3.4.1 Theory

Let's clear up a potentially problematic issue to avoid any confusion: you've already learned that a sample is the smallest unit used for measuring and generating sound in a computer. The word 'sample' unfortunately also has another, quite different meaning in electronic music; it means a smallish section (usually a couple seconds long) of recorded sound. This chapter deals with the processing of short recorded bits of sound. First you'll have to learn how "array" works in Pd, which requires a fair amount of explanation.


3.4.1.1 Storing sound

3.4.1.1.1 Sound files

There are various locations in the computer where files can be saved: main memory or hard disks. Access to main memory is very fast in comparison to the hard disk; however, it has much less available space.

In Pd you can save sound to both locations. Saving to the hard disk means that you are saving a fixed sound file. WAV or AIFF formats are typically used. Use the "writesf~" object to write a sound file to disk. The argument is the number of channels; this creates a corresponding number of inlets to which you attach the sounds you want to record. First you have to use the message "open [name]" to choose the name of the file you want to create. Start recording using "start" and stop it using "stop".

컴퓨터 안에 파일 저장할 곳 많은데. 메인 메모리랑 하드디스트, 메인 메모리에 접근하는 것은 하드디스크에 접근하는거보다 비교적 빠르다. 근데 저장한 공간이 많지 않다.

피디는 두군데 다 저장할수있다. 하드디스크에 저장할때 wav aiff파일 형식으로 보통 저장되고. writesf~오브젝트를 사용해서 사운드파일을 디스크에 기록할 수 있다. 오브젝트 박스 오른편에 넣을 변수는 채널의 갯수다. 이것은 adc~ 가 투채널이면, 롸이트에스에프 채널을 두개 만들어서 둘다 연결해주면, 스테레오 사운드를 마이크로 받아서 기록할 수 있다. 처음 오픈과 저장하고 싶은 파일 이름을 기입하고 클릭한다. 그리고 레코딩 하고 싶을때 스타트 끝내고 싶을때 스탑


3.4.1.1.2 Buffers

The other possible location is the main memory. Create one place for one sound using "array" (PutArraythen click "ok"). It is also a visualization of the sound.

Let's first think of an array simply as storage for numbers. An array has a limited number of storage places. You can set this number using by right-clicking the array and going to "Properties". This opens two windows: one labeled "array" and the other labeled "canvas". In the "array" window, you can set the size. This number means the number of storage places. One number can be stored in each storage place.

You can allocate these cells using "tabwrite". The right argument determines the position; the left determines the value you want to save (as always: from right to left). In the array, the x-axis shows position and the y-axis shows the value.

메인 메모리에 저장하는 다른 방법은 어레이라는 것을 사용해서 하나의 사운드를 위한 하나의 공간을 만드는 것이다. 또한 사운드데이타를 시각화하는 방법이기도 하고

우선 숫자들을 저장하는 간단한 어레이를 생각해보자 어레이(배열, 집합체)는 한계가 있는 숫자들의 저장공간인데, 너는 오른쪽 클릭에서 프라펄티에서 이 한계값 숫자를 세팅할 수 잇다. 그것은 두가지 윈도우를 오픈하는데, 어레이라고 이름 붙여지는 것과 캔버스라고 이름 붙여지는 것 두개.

어레이 윈도우에서 너는 사이즈를 세팅하고 이 숫자는 저장 공간의 숫자를 의미한다. 하나의 숫자는 각각 저장장소에 저장 될 수 있다.

너는 또한 탭라이트를 이용해서 이 셀들을 할당 할수 있는데. 오른쪽 변수는 포지션을 결정한다. 왼쪽 변수는 너가 저장하고 싶은 (항상 오른쪽에서 왼쪽) 값을 결정한다. 어레이에서 x 축은 포지션을 보여주고, y축은 값을 보여준다.

You can use "array" to represent functions:

patches/3-4-1-1-2-function1.pd

Or without temporal stretching (if the example shown causes a stack overflow, inserting "del 0" between "spigot" and "f" will help):

patches/3-4-1-1-2-function2.pd

You could also draw in the array itself with the mouse, 'by hand' so to speak. If you move the mouse to a value in the array, the cursor (shaped like an arrow) will change its direction and you can draw by moving the mouse with the mouse button held.

마우스로 어레이에 직접 드로잉할 수 있다.

Under 'Properties' (right-click on the array), you can set the following:

In the "array" window:

  • Name: Like all names in Pd, use alphanumeric characters without spaces, not only numbers.

  • Size: As described above.

  • "save contents": When checked, all values in an array will be saved. If you use large arrays or a large number of arrays, this could cause your patch to load very slowly.

  • "draw as points" / "polygon" / "bezier curve": Different kinds of visualization.

  • "delete me": When checked, this deletes the array! The empty box remains, however, and must also be deleted.

  • "view list": This displays all values in a list.

어레이 윈도우에서는

1 어레이이름 (숫자로만 안되고 스페이스바 쓰지 말고,) 2. 사이즈 3. 세이브 컨텐츠를 클릭하면, 어레이의 모든값이 저장된다. 너가 큰 어레이를 만들경우 패치 열때 이것 때문에 오래 걸릴 수있다. 4. 점으로 그릴질 선으로 그릴지 커브로 그릴지 시각화를 다르게 함

In the "canvas" window:

  • "graph on parent": This will be discussed later in3.1.1.2.

  • X range: You can set the range for the x-axis here.

  • Y range: You can set the range for the y-axis here. Values that fall outside this range will also be saved, but this will enlarge the entire window so that these values can be seen.

  • "size": Visual size in the patch.

캔버스 창에서는 1. 그래픽 온 페어런트 는 나중에 3.1.1.2에서 다룬다. 2. 엑스값레이지 3. 와이값레인지를 설정할 수 있는데, 볼수 있도록 전체 창고 크게 해야할꺼다. 4. 사이즈는 패치에서 시각적 사이즈를 말한다.

An array can also receive messages and "sends".

Renaming:

Making all values equal:

Changing the size:

The size can also be printed out:

Writing the contents to a text file:

Reading a text file:

You can also enter values like this. The first number determines which storage place to start with; all other values are for the positions thereafter:

어레이 안에 원하는 값을 넣을 수 있는데 첫번째 값은 시작하길 원하는 저장 공간을 결정하고, 그 이후의 값은 포지션을 의미한다.

You can also create hash marks on the axes and label them:

The first argument is the starting position; the second is the distance between the lines; the third is the distance between the longer lines.

첫번쨰 변수는 시작점, 두번째 변수는 라인들 사이의 거리, 세번째는 조금 긴 눈금 간격

You can also number them:

First, the position is labeled; second, the numbers you want to display.

N.B.: Lines and labels are not stored in the patch, so you have to reenter them every time you open the patch

처음 포지션은 라벨이 표시되는 지점 이고 두번쨰 변수부터 표시하고 싶은 숫자를 쓰는 것

라인과 라벨은 패치에서 자동 저장 되지 않기 때문에 패치를 열면 그때마다 그들을 다시 불러와야 한다.

You can, of course, also store sound in an array. For a computer, sound is - as has been often mentioned - nothing but a string of numbers, 44100 numbers to be precise. You could store one second of sound in an array; you'd just need to use 44100 storage places. Here's where the "tabwrite~" object comes into play. It receives the sound input and otherwise just a bang. Unlike with "tabwrite" (without a tilde) where you entered the storage place in the rig.nht inlet 'by hand' and the corresponding value on the left, when "tabwrite~" receives a "bang", it automatically starts with the first storage place and then proceeds at sample speed (44100 samples/sec). At the same time, every place is allocated a value received by the left inlet from the current sound, resulting in a total of 44100 stored numbers. Any sound that follows is not stored. If you want to stop prematurely, you can send a "stop" message.

너는 어레이에 소리를 저장할 수 있다. 컴퓨터에서 사운드는 보통 정교한 44100의 숫자 의 끝으로 종종 거론되는데, 너는 하나의 어레이에 소리의 이분의 일을 저장할 수 있다. 너는 44100의 저장소를 이용해야할 필요가 있다. 여기 tabwrite~ 오브젝트는 사운드 인풋을 받거나, 하나의 뱅이기도 하다. 틸트 없는 탭롸이트가 rig.nht인렛에서 수동으로 저장공간을 넣고, 왼쪽에 그에 합당한 값을 넣는 것과 달리, 탭롸이트 틸트는 뱅을 받는다. 그것은 자동적으로 첫번째 저장공간부터 시작시키고 샘플스피드로 진행시킨다. 같은 시간에 모든 저장 공간이 왼쪽인렛에서 현재 소리로 부터 왼쪽 인렛으로 받는 값으로 할당 받게되는데, 그 결과는 44100개의 숫자로 저장된다. 어떤 소리는 저장되지 않는다. 너가 예정보다 빨리 정지하길 원하면, 정지 메세지를 보낼 수 있다.

patches/3-4-1-1-2-normalize.pd

If "tabwrite~" receives a float message, this number is interpreted as a sample offset. In other words, the sample that corresponds to this float number will be the starting point for the array.

탭롸이트틸트가 어떤 숫자메세지를 받으면, 그 숫자는 샘플 숫자 배열에 영향을 주는데, 다시 말하면, 그 숫자에 부합하는 샘플이 어레이의 시작부분이 될것이다.

One useful function is that it's possible to raise the overall volume after the fact. If, for example, the original recording is too quiet (i.e., the membrane of the microphone didn't vibrate especially strongly, which resulted in fairly small values), you can amplify it. This is called "normalizing". For this, you can use the following message:

예를들면 원래 레코딩된 소리가 너무 조용하다면, (마이크장치의 소리막이 특별히 강하게 진동되지 않아서, 그 값이 다소 작게 잡힘)너는 그것을 크게 늘 증폭시킬수 있다. 그것을 우리는 노말라이징이라고 한다. 이것을 위해서 다음 메세지가 유용하다.

You can also make a connection between sound files located in the main memory and those located on the hard disk in array. This is achieved with the "soundfiler" object. This object allows you to load a sound file stored on the hard disk into an array, or to save the contents of an array on the hard disk as a sound file. The command "read" is used to load a sound file. The arguments for the command are the name of the file (with the path if necessary) and then the name of the array to which you want to write.


results matching ""

    No results matching ""